What are the reasons that live() and bind() are deprecated post jQuery 1.7

混江龙づ霸主 提交于 2019-12-20 03:28:05

问题


As of post jQuery 1.7 the .live() and .bind() are deprecated and instead of that .on() is being used. Both of these were great functions were working like charm. What is purpose of removal? What is the technical reason behind that?

And why .on() is proffered to use?


回答1:


Quote from this article:

  1. You can’t use live for reusable widgets.

  2. stopPropagate() doesn’t work in live

  3. Live is slower

  4. Live isn’t chainable



来源:https://stackoverflow.com/questions/15924175/what-are-the-reasons-that-live-and-bind-are-deprecated-post-jquery-1-7

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!