[wd_asp elements=’search’ ratio=’100%’ id=1]

Ajax Spinner – Start and Complete Function

31st July 2017

Jquery - Ajax

jquery icon

Let Ajax change this text


Combine with the script below to get all hrefs to load as ajax links into one main frame.

$(document).ready(function(){

$(document).ajaxStart(function(){
$("#wait").css("display", "block");
});
$(document).ajaxComplete(function(){
$("#wait").css("display", "none");
});

$("a").click(function(){
// Load the content of the page referenced in the a-tags href
$("#pageLoad").load($(this).attr("href"));
// Prevent browsers default behaviour to follow the link when clicked
return false;
});

});

PLEASE WAIT...
Loading...