Create custom events and trigger them via trigger()
With jQuery, you have the ability to manufacture your own custom events using the bind()
method. This is done by providing the bind() method with a unique name for a custom event.
Now, because these events are custom and not known to the browser, the only way to invoke
custom events is to programmatically trigger them using the jQuery trigger() method.
Examine the code below for an example of a custom event that is invoked using trigger().
Sample: sample76.html
jQuery
Cloning events as well as DOM elements
By default, cloning DOM structures using the clone() method does not additionally clone the
events attached to the DOM elements being cloned. In order to clone the elements and the
events attached to the elements you must pass the clone() method a Boolean value of true.
Sample: sample77.html
Add another link