Plugin jQuery: jQuery Ajax StartDelay

jQuery Ajax StartDelay
http://www.jqueryrain.com/?http://www.invetek.nl/samples/ajaxstartdelay/
https://github.com/invetek/jquery-ajaxstartdelay
x
07/11/2013

Nội dung

jQuery Ajax StartDelay

A small jQuery plugin providing a delay to be set before the handler is called in jQuery’s .ajaxStart().

The .ajaxStart event handler in jQuery calls the handler immediately when the ajaxStart event is triggered. In other words: when the AJAX request is made the handler is called. Most of the time the handler is used to show the user some kind of notice like ‘please wait a minute’ while the AJAX request-response cycle is on its way. It’s annoying to see this notice everytime an AJAX request is made. It’s nicer when this notice only shows up when the request-response cycle takes longer than a few seconds. This plugin provides the functionality to delay the call to the handler.

The plugin is simply a wrapper around the .ajaxStart event handler.


Nguồn: www.jqueryrain.com/2013/11/jquery-ajax-startdelay/


Chưa có phản hồi
Bạn vui lòng Đăng nhập để bình luận