开发者

what is the difference between normal js timers and this jquery timers plugin?

If I use setInterval or setTimeout for an ani开发者_如何学Pythonmation, the speed of the animation is different in all the browsers, but if I use the jquery timer plugin its the speed is almost exactly the same in every browser. How exactly does it do that? ive looked through the code of the plugin but i cant figure it out. Here is the link for the plugin jquery.timers


Not likely.

This is at the heart of the plugin

if (!element.$timers[label][fn.$timerID]) 
  element.$timers[label][fn.$timerID] = window.setInterval(handler,interval);
.
.
.
window.clearInterval(timers[label][fn.$timerID]);
0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜