What makes binding slow?

Mat*_*rym 5 javascript jquery events binding bind

Is it the process of doing the binding, or the having many things bound that's the primarily issue of binding more events than necessary?

The answer's probably both, but to what extent?

此外,我认为鼠标悬停事件比点击事件更昂贵,因为必须更频繁地检查它们.对?

kar*_*m79 2

事件的绑定确实需要时间,因此,如果您绑定一百个或更多事件,则在绑定所有这些事件期间,用户与浏览器的交互将“平稳”。

页面上的事件处理程序越多,事件队列越长,UI 就越慢。

@Juan 在他的回答中用一句话很好地总结了事件委托,作为将事件绑定到许多子元素的替代方法。