The plugins site is currently in development.
We've been looking to provide a higher-quality, spam-free experience at the plugins site for some time, and a major error on our part forced us to shut down the current site before we could put the new one in place. We are developing a new site, and you can follow along with its development on GitHub. For more information about this transition, including steps you can take as a plugin author to prepare, please read our post about what's going on.
ajax feedback using delay callback
This small plugin will let you do the same "loading..." as gmail does. Simply as extending $.ajax with delay as following:
$.ajax({
beforeSend: callback,
delay: {
callback: callback1,
time: 5000 // delay timeout in ms
},
success: callback2,
error: callback3,
complete: callback4
});In this example, whenever a request/response takes longer than 5 seconds, callback1 will be called. To check it out, you can do the following:
var callback1 = function(){
alert("still loading...");
};