问题
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:
You can’t use live for reusable widgets.
stopPropagate() doesn’t work in live
Live is slower
Live isn’t chainable
来源:https://stackoverflow.com/questions/15924175/what-are-the-reasons-that-live-and-bind-are-deprecated-post-jquery-1-7