I have one HTML dashboard page and I use ajax for loading other content to it. All is working fine and it shows my other pages but the problem is after it loads new content my javascript codes in new page not working
this is my div in the dashboard page
<div id="ajax_load">
</div>
and it's my ajax code
$(document).ready(function() {
$("#ajax_load").load("./profile.html");
});
and it's my porfile page
<h1>hi</h1>
<script>
$(document).ready(function() {
alert('hi');
});
</script>
and the problem is that alert in profile page not work after load