hi all,
as i understand the getScript function should be asyncronous, but when
i use it the website won't finish loading (in firefox).
my code:
jQuery(document).ready(function(){
function get_url_param( name )
{
name = name.replace(/[\[]/,"\\\[").replace(/[\]]/,"\\\]");
var regexS = "[\\?&]"+name+"=([^&#]*)";
var regex = new RegExp( regexS );
var results = regex.exec( window.location.href );
if ( results == null )
return "";
else
return results[1];
}
function getCounter(){
jQuery.getScript('http://example.com/counter?id='+get_url_param
('id'), function(){
jQuery('#counterfu_online_count').text(count);
getCounter();
});
}
getCounter();
});
getCounter() calls itself so the counter this script is used for is
updated - all works well, just the page keeps loading...
so whats the problem here? why does the website not finish loading?