Skip to content

Commit fd3b18b

Browse files
tomfuerteskswedberg
authored andcommitted
one(): Fix description of behavior for delegated .one() events. Closes jquery#519
1 parent 9959d69 commit fd3b18b

File tree

1 file changed

+1
-4
lines changed

1 file changed

+1
-4
lines changed

entries/one.xml

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -44,13 +44,10 @@
4444
</argument>
4545
</signature>
4646
<longdesc>
47-
<p>The first form of this method is identical to <code>.bind()</code>, except that the handler is unbound after its first invocation. The second two forms, introduced in jQuery 1.7, are identical to <code>.on()</code> except that the handler is removed after the first time the event occurs at the delegated element, whether the selector matched anything or not. For example:</p>
47+
<p>The <code>.one()</code> method is identical to <code>.on()</code>, except that the handler is unbound after its first invocation. For example:</p>
4848
<pre><code>
4949
$( "#foo" ).one( "click", function() {
5050
alert( "This will be displayed only once." );
51-
});
52-
$( "body" ).one( "click", "#foo", function() {
53-
alert( "This displays the first time #foo is clicked in the body." );
5451
});
5552
</code></pre>
5653
<p>After the code is executed, a click on the element with ID <code>foo</code> will display the alert. Subsequent clicks will do nothing. This code is equivalent to:</p>

0 commit comments

Comments
 (0)