首页| JavaScript| HTML/CSS| Matlab| PHP| Python| Java| C/C++/VC++| C#| ASP| 其他|
购买积分 购买会员 激活码充值

您现在的位置是:虫虫源码 > JavaScript > jQuery.Deferred wrapper for the native JavaScript setTimeout/clearTimeout functions

jQuery.Deferred wrapper for the native JavaScript setTimeout/clearTimeout functions

  • 资源大小:1.39 kB
  • 上传时间:2021-06-29
  • 下载次数:0次
  • 浏览次数:0次
  • 资源积分:1积分
  • 标      签:

资 源 简 介

jQuery 1.5 introduced the Deferred callback management system, to ease handling callbacks for asynchronous events. Although the jQuery documentation contains examples on how to use Deferred objects with the native window.setTimeout and window.clearTimeout functions, jQuery does not provide a simple interface for timer-based Deferreds by its own. This plugin provides a single function jQuery.timeout that, given a delay in milliseconds, creates a jQuery.Deferred instance that will be resolved after the given delay. The returned object also provides a clear method, which will reject the Deferred object and clear the native timeout ID if called before the timeout has elapsed. Since version 1.1.0, both timeout and delay support optional arguments that are passed to the Deferred"s doneCallbacks. News As
VIP VIP
0.159908s