Binds an event handler to all matched elements of the given type.
The events are also bound to any new elements added to the DOM via jQuery methods if matched. An event is unbound from an element if the element is changed and no longer matched.
Arguments:
| type | String | |
|---|---|---|
| An event type. | ||
| fn | Function | |
A function to bind to the event on each of the matched elements
function callback(eventObject) {
this; // dom element
}
| ||