开发者

Does jQuery live use setInterval?

开发者_如何学Python

Is the jQuery live method using setInterval to update the events?

Does this affect performance?


Based on this blog as a resource, it appears that jQuery.live() works by attaching the events to the document. Then, when an event is triggered (such as by a click), the event bubbles up to the document level - at which point it is compared against all the live event handlers. If it matches a live event handler, it fires the event for it.


This blog describes pretty well what's going on behind the scene.

http://www.neeraj.name/blog/articles/882-how-live-method-works-in-jquery-why-it-does-not-work-in-some-cases-when-to-use-livequery

live does not use setinterval but livequery does.


It seems it does NOT use SetInterval. I could be wrong.

0

上一篇:

下一篇:

精彩评论

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

最新问答

问答排行榜