bind, live and delegate could behave unpredictably when used together. For example, $ (document) .unbind ('click') removed all live ('click') events from the entire document. The new event API .on () and .off () is designed to somehow unify the system of creating event handlers:
Old API
New API
$ (elems) .bind (events, fn)
$ (elems) .on (events, fn)
$ (elems) .bind (events, {mydata: 42}, fn)
$ (elems) .on (events, {mydata: 42}, fn)
$ (elems) .unbind (events, fn)
$ (elems) .off (events, fn)
$ (elems) .delegate (events, selector, fn)
$ (elems) .on (events, selector, fn)
$ (elems) .undelegate (events, selector, fn)
$ (elems) .off (events, selector, fn)
$ (selector) .live (events, fn)
$ (document) .on (events, selector, fn)
$ (selector) .die (events, fn)
$ (document) .off (events, selector, fn)
The old API will not be removed yet.
Form Change and Submit events in IE 6/7/8
Improved event creation performance. Close to a dozen errors associated with these events. ')
Animation enhancement
Previously, when stopping an animation with .stop (), the animated blocks could never return to their full-sized state. (for example, slideToggle () + stop ()). Even when specifying .stop (true, true) during slide-animations there was such a glitch. That at the moment of triggering the stop () current block height became maximum during subsequent animations. Now before the animation, the original block size is remembered.
Improving .removeData ()
.removeData () now allows you to pass a string with spaces or an array of names to delete.