I have a function that loads parts of other pages into my div #ajaxloadconent, here is the function:
$('#ajaxloadcontent').load(url+' #ajaxloadcontent');
However, the problem is that I am unable to run javascript on the page that I load, while using this function. I simply want to run this:
<script type="text/javascript">
document.title = 'PearlSquirrel About';
</script>
When the data is loaded through .load(). The script is contained on the page that I load, so I do not want to modify the .load() function that I use. If anyone knows how to fix this, then help would be greatly appreciated. I can also provide further information if necessary.
#ajaxloadcontentelement?$.ajaxto give you more control over it. simply replace hisalert(data)with$(data).find("#ajaxloadedcontent").appendTo("#ajaxloadcontent"). replace.findwith.filterif#ajaxloadedcontentis a direct child of the body or if it is the only html in the document.