Skip to content
Closed
Show file tree
Hide file tree
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Next Next commit
delegate: Document the method was deprecated in jQuery 3
Fixes gh-945
  • Loading branch information
AurelioDeRosa committed Jul 10, 2016
commit 2d3641f5c5c770c7c7f4db12ffc3c6a6fbf2899b
5 changes: 5 additions & 0 deletions categories.xml
Original file line number Diff line number Diff line change
Expand Up @@ -66,6 +66,11 @@
<p>For more information, see the Release Notes/Changelog at <a href="https://blog.jquery.com/2013/05/24/jquery-1-10-0-and-2-0-1-released/">https://blog.jquery.com/2013/05/24/jquery-1-10-0-and-2-0-1-released/</a></p>
]]></desc>
</category>
<category name="Deprecated 3.0" slug="deprecated-3.0">
<desc><![CDATA[All the aspects of the API that were deprecated in the corresponding version of jQuery.
<p>For more information, see the Release Notes/Changelog at <a href="http://blog.jquery.com/2016/06/09/jquery-3-0-final-released/">http://blog.jquery.com/2016/06/09/jquery-3-0-final-released/</a></p>
]]></desc>
</category>
</category>
<category name="Dimensions" slug="dimensions">
<desc><![CDATA[These methods are used to get and set the CSS dimensions for the various properties.]]></desc>
Expand Down
5 changes: 3 additions & 2 deletions entries/delegate.xml
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
<?xml version="1.0"?>
<entry type="method" name="delegate" return="jQuery">
<entry type="method" name="delegate" return="jQuery" deprecated="3.0">
<title>.delegate()</title>
<desc>Attach a handler to one or more events for all elements that match the selector, now or in the future, based on a specific set of root elements.</desc>
<signature>
Expand Down Expand Up @@ -41,7 +41,7 @@
</argument>
</signature>
<longdesc>
<p>As of jQuery 1.7, <code>.delegate()</code> has been superseded by the <a href="/on/">.on()</a> 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 <a href="/on/">.on()</a> method. In general, these are the equivalent templates for the two methods:</p>
<p>As of jQuery 3.0, <code>.delegate()</code> has been deprecated. It was superseded by the <a href="/on/">.on()</a> 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 <a href="/on/">.on()</a> method. In general, these are the equivalent templates for the two methods:</p>
<pre><code>
// jQuery 1.4.3+
$( elements ).delegate( selector, events, data, handler );
Expand Down Expand Up @@ -148,4 +148,5 @@ $( "button" ).click(function() {
<category slug="events/event-handler-attachment"/>
<category slug="version/1.4.2"/>
<category slug="version/1.4.3"/>
<category slug="deprecated/deprecated-3.0"/>
</entry>