(^510) ❘ APPENDIX D EVENTS
bind(events[, data]
[, preventBubble])
string events
object data
boolean preventBubble
When calling the bind() method with the
preventBubble argument, an event handler is
automatically created, which prevents bubbling, as well
as the default action.
bind(eventName, false);
or
bind(eventName);
is equivalent to creating the following:
bind(
eventName,
function(event)
{
event.preventDefault();
event.stopPropagation();
}
);
The on() method is preferred over bind() in jQuery 1.7
or later.
bind(events)
object events
Allows multiple events to be bound by passing an object
where the property is the name of the event and the
value is the callback function. For example:
bind({
click : function(event)
{
},
mouseover : function(event)
{
},
mouseout : function(event)
{
}
})
The on() method is preferred over bind() in jQuery 1.7
or later.
delegate(selector,
events, function)
string selector
string events
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.
(continued)
http://www.it-ebooks.info
elliott
(Elliott)
#1