I understand that live()
in jQuery can be used to bind events to elements which do not exist at the time of binding.
However there is also a difference wrt to event propagation between bind()
method and the live()
.
The following is an excerpt from the jQuery in action book:
"Firstly, recognize that live events aren’t native “normal” events. When an event such as a click occurs, it propagates up through the DOM elements as described earlier in this chapter, invoking any event handlers that have been established. Once the event reaches the context used to create the wrapped set upon which live() was called (usually the document), the context checks for elements within itself that match the live selector. The live event handlers are triggered on any elements that match, and this triggered event doesn’t propagate."
Can anyone help me understand what this means?