$(document).ready(function(){
$("a[href*='http://']:not([href*='"+location.hostname+"'])").attr("target","_blank");
$("a[target!='_blank'][target!='_top']").click(function(){
$("#actualcontent").load($(this).attr("href"));
$("#nav").load('nav.php');
window.location.hash=$(this).attr("href");
return false;
});
});
This code works fine, but when you click links, the pages load but they freeze the page until fully loaded. Any idea of a workaround?
This script is embedded at the bottom of the page. It also sometimes reloads the page - which isn't really a problem, but when it's freezing, it can become very frustrating. As well as when you're entering information into a input.
If you ask any questions, I will reply to them pretty quickly. Cheers ;)
Also, this script works with all the links on the initial page, but if I load a new page (via this script), their links just open normally.
How can I work around this? As if I embed this script into every page, it seems to make the page reload continuously. (That could be another error though), cheers!