Why doesn't my javascript work after AJAX filling the HTML?
- by alex
$.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