i have a problem i'm loading page in my div using ajax here is a code
Html
<div id="body"></div>
<a class='olink' href='#'>page name</a>
script
$('.olink').on('click',function(e){
var link = this.href;
$.ajax({
url: page,
type:'POST',
data : name,
success: function(resp){
$("#body").html(resp);
}
e.preventDefault();
});
});
The above code working fine and load page in my div, now problem is when i click on any link from loaded page this script not working... currently i add my script in the bottom of main page,, should i add this script on every page?