From 2d3641f5c5c770c7c7f4db12ffc3c6a6fbf2899b Mon Sep 17 00:00:00 2001
From: Aurelio De Rosa For more information, see the Release Notes/Changelog at https://blog.jquery.com/2013/05/24/jquery-1-10-0-and-2-0-1-released/ As of jQuery 1.7, As of jQuery 3.0, As of jQuery 1.7, the As of jQuery 3.0, Any string is legal for If the There are shorthand methods for some standard browser events such as As of jQuery 3.0, As of jQuery 3.0, Event handlers attached with Event handlers attached with In the simplest case, with no arguments, The The Event handlers attached with In the simplest case, with no arguments, As of jQuery 3.0, Event handlers attached with The As of jQuery 3.0, The .delegate()
has been superseded by the .on() method. For earlier versions, however, it remains the most effective means to use event delegation. More information on event binding and delegation is in the .on() method. In general, these are the equivalent templates for the two methods:.delegate()
has been deprecated. It was superseded by the .on() method since jQuery 1.7, so its use was already discouraged. For earlier versions, however, it remains the most effective means to use event delegation. More information on event binding and delegation is in the .on() method. In general, these are the equivalent templates for the two methods:
// jQuery 1.4.3+
$( elements ).delegate( selector, events, data, handler );
@@ -148,4 +148,5 @@ $( "button" ).click(function() {
.on()
method is the preferred method for attaching event handlers to a document. For earlier versions, the .bind()
method is used for attaching an event handler directly to elements. Handlers are attached to the currently selected elements in the jQuery object, so those elements must exist at the point the call to .bind()
occurs. For more flexible event binding, see the discussion of event delegation in .on()
or .delegate()
..bind()
has been deprecated. It was superseded by the .on()
method for attaching event handlers to a document since jQuery 1.7, so its use was already discouraged. For earlier versions, the .bind()
method is used for attaching an event handler directly to elements. Handlers are attached to the currently selected elements in the jQuery object, so those elements must exist at the point the call to .bind()
occurs. For more flexible event binding, see the discussion of event delegation in .on()
or .delegate()
.eventType
; if the string is not the name of a native DOM event, then the handler is bound to a custom event. These events are never called by the browser, but may be triggered manually from other JavaScript code using .trigger()
or .triggerHandler()
.eventType
string contains a period (.
) character, then the event is namespaced. The period character separates the event from its namespace. For example, in the call .bind( "click.name", handler )
, the string click
is the event type, and the string name
is the namespace. Namespacing allows us to unbind or trigger some events of a type without affecting others. See the discussion of .unbind()
for more information..click()
that can be used to attach or trigger event handlers. For a complete list of shorthand methods, see the events category..delegate()
has been deprecated. It was superseded by the .on() method since jQuery 1.7, so its use was already discouraged. For earlier versions, however, it remains the most effective means to use event delegation. More information on event binding and delegation is in the .on() method. In general, these are the equivalent templates for the two methods:.delegate()
has been deprecated. It was superseded by the .on()
method since jQuery 1.7, so its use was already discouraged. For earlier versions, however, it remains the most effective means to use event delegation. More information on event binding and delegation is in the .on()
method. In general, these are the equivalent templates for the two methods:
// jQuery 1.4.3+
$( elements ).delegate( selector, events, data, handler );
diff --git a/entries/unbind.xml b/entries/unbind.xml
index e6be9a13..11d55d3f 100644
--- a/entries/unbind.xml
+++ b/entries/unbind.xml
@@ -1,5 +1,5 @@
-
.bind()
can be removed with .unbind()
. (As of jQuery 1.7, the .on()
and .off()
methods are preferred to attach and remove event handlers on elements.) In the simplest case, with no arguments, .unbind()
removes all handlers attached to the elements:.bind()
can be removed with .unbind()
. As of jQuery 3.0, .unbind()
has been deprecated. It was superseded by the .off()
method since jQuery 1.7, so its use was already discouraged..unbind()
removes all handlers attached to the elements:
@@ -155,4 +156,5 @@ $( "p" ).unbind( "click", foo ); // ... foo will no longer be called.
$( "#foo" ).unbind();
.undelegate()
method is a way of removing event handlers that have been bound using .delegate()
. As of jQuery 1.7, the .on()
and .off()
methods are preferred for attaching and removing event handlers..undelegate()
method is a way of removing event handlers that have been bound using .delegate()
. As of jQuery 3.0, .undelegate()
has been deprecated. It was superseded by the .off()
method since jQuery 1.7, so its use was already discouraged..bind()
can be removed with .unbind()
. As of jQuery 3.0, .unbind()
has been deprecated. It was superseded by the .off()
method since jQuery 1.7, so its use was already discouraged..unbind()
removes all handlers attached to the elements:.unbind()
has been deprecated. It was superseded by the .off()
method since jQuery 1.7, so its use was already discouraged..bind()
can be removed with .unbind()
. In the simplest case, with no arguments, .unbind()
removes all handlers attached to the elements:
diff --git a/entries/undelegate.xml b/entries/undelegate.xml
index 6f8c7df3..f97e6b01 100644
--- a/entries/undelegate.xml
+++ b/entries/undelegate.xml
@@ -43,7 +43,8 @@
$( "#foo" ).unbind();
.undelegate()
method is a way of removing event handlers that have been bound using .delegate()
. As of jQuery 3.0, .undelegate()
has been deprecated. It was superseded by the .off()
method since jQuery 1.7, so its use was already discouraged..undelegate()
has been deprecated. It was superseded by the .off()
method since jQuery 1.7, so its use was already discouraged..undelegate()
method is a way of removing event handlers that have been bound using .delegate()
.