为了账号安全,请及时绑定邮箱和手机立即绑定

jquery Timers 介绍与使用

标签:
JQuery

                                                                JQuery Timers JqueryTimers 是一个依赖于jquery进行定时执行js的js代码,代码很短只有100多行的代码,不过十分好玩,jqueryTimer允许你使用毫秒数 "ms" "sd" "s" "das" "ws" "ks"这样的时间单位来进行设置时间,确实很好玩的.   用法:everyTime(interval : Integer | String, [label = interval : String], fn : Function, [times = 0 : Integer], [belay = false : Boolean])    everyTime will add the defined function (fn) as a timed event to run at a given time interval (interval) for a given number of times (times) optionally belaying event triggering if the previous iteration is not complete (belay). If times is set to 0, the number of times the method is called is unbounded. A label is also set for the given timed event either to the provided string (label) or to the string representation of the interval provided. Additionally, the interval can be defined by using a string such as "3s" for 3 seconds.

oneTime(interval : Integer | String, [label = interval : String], fn : Function)

oneTime will call the defined function (fn) a certain amount of time (interval) after being added to the elements in the jQuery object. A label (label) is also set for the timed event either to the provided string (label) or to the string representation of the interval provided.

stopTime([label : Integer | String], [fn : Function])

stopTime will stop any timed events with the provided label (label) and function (fn). If neither is specified, it will stop all timed events acting on the elements in the jQuery object. If only the function is provided, then it will stop all timed events calling that function regardless of label. Finally if only the label is provided, it will stop all timed events given that label at initialization.  示例:[url]http://jquery.offput.ca/every/[/url]

点击查看更多内容
TA 点赞

若觉得本文不错,就分享一下吧!

评论

作者其他优质文章

正在加载中
  • 推荐
  • 评论
  • 收藏
  • 共同学习,写下你的评论
感谢您的支持,我会继续努力的~
扫码打赏,你说多少就多少
赞赏金额会直接到老师账户
支付方式
打开微信扫一扫,即可进行扫码打赏哦
今天注册有机会得

100积分直接送

付费专栏免费学

大额优惠券免费领

立即参与 放弃机会
意见反馈 帮助中心 APP下载
官方微信

举报

0/150
提交
取消