My code hangs Chrome and Safari for about 3sec. Firefox works perfectly. How can i set this in async: true -state? Or is my only option preload all pages in divs and hide them when entering to site?
$(document).ready(function() {
$("#Button").click(function(evt) {
$('#change').html('<p><img src="ajax-loader.gif" width="15" height="15" /></p>');
$("#change").load('reg.php')
})
});
![]()
'); $.ajax({ url: "reg.php", cache: false, async: true }).done(function( html ) { $("#change").html(html); }) }) }); – Jarno Jul 11 '13 at 04:16