Why doesn't my javascript work after AJAX filling the HTML?
Posted
by alex
on Stack Overflow
See other posts from Stack Overflow
or by alex
Published on 2010-03-24T20:33:28Z
Indexed on
2010/03/24
20:43 UTC
Read the original article
Hit count: 200
$.ajax({
method:"get",
url:"/details/",
data:"id="+id,
beforeSend:function(){
},
success:function(html){
$("#holder").html(html);
}
});
After I fill a div with a HTML from an AJAX call, this is my javascript at the top of /details/
<script type="text/javascript">
alert('hi');
</script>
MY DETAILS HTML CONTENT GOES HERE
But it's not working
© Stack Overflow or respective owner