开发者

How long do jquery bindings take to set up?

I have a project that sets up several pages with articles. Each page has, at minimum three bindings: a sideways scroll, a vertical scroll and a titlebar you can pull down.

I also have a spinner, which stops when the script is done, but movement is slow for an开发者_JAVA百科other few seconds.

I've seen many discussions of the speed for DOM traversal, but nothing for how long complicated bindings take to set up...

I would like to hide the spinner only when everything is ready, not when the code is run but stuff is still being arranged behind the scenes...


Bindings take very little time at all to setup. What may be taking up your time is the actual element selection before adding the bindings. If you're binding to lots of small elements (eg. every <td> in a table, or every <p> in the document), you might consider using event delegation instead.

0

上一篇:

下一篇:

精彩评论

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

最新问答

问答排行榜