Appendix D (^) ❘ 511
delegate(selector,
events, data, function)
string selector
string events
object data
function(event)
Provides the same functionality as the on() method in
jQuery 1.4.2 and later. The on() method is preferred over
delegate() in jQuery 1.7 or later.
delegate(selector,
events)
string selector
string events
Provides the same functionality as the on() method in
jQuery 1.4.2 and later. The on() method is preferred over
delegate() in jQuery 1.7 or later.
off(events[, selector][,
function])
string events
string selector
function(event)
Removes an event handler.
off(events[, selector])
string events
string selector
Removes an event handler.
off() Removes all event handlers.
on(events[, selector][,
data], function)
string events
string selector
object data
function(event)
Attaches an event handler for the selected elements; the
elements referenced in the selection must exist at the
time on() is called.
If a selector is provided in the second argument, descen-
dant element(s) referenced by the selector will be the
element(s) receiving the event(s), rather than the original
selection. Elements referenced by the selector may or
may not exist when on() is called. If new descendant
elements matching the selector are created after the
attachment of the event(s), those element(s) automatically
receive the event(s) when they exist.
Custom data can be passed in the data argument;, if
custom data is provided, it will be available in the event
handler, in the event argument, as event.data.
continues
http://www.it-ebooks.info
elliott
(Elliott)
#1