Skip to content

Commit 41fc751

Browse files
committed
triggerHandler: Rephrase description and differences from trigger
1 parent 918bdef commit 41fc751

1 file changed

Lines changed: 2 additions & 2 deletions

File tree

entries/triggerHandler.xml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -14,9 +14,9 @@
1414
</argument>
1515
</signature>
1616
<longdesc>
17-
<p>The <code>.triggerHandler()</code> method behaves similarly to <code>.trigger()</code>, with the following exceptions:</p>
17+
<p><code>.triggerHandler( eventType )</code> executes all handlers bound with jQuery for the event type. It will also execute any method called <code>on{eventType}()</code> found on the element. The behavior of this method is similar to <a href="/trigger"><code>.trigger()</code></a>, with the following exceptions:</p>
1818
<ul>
19-
<li>The <code>.triggerHandler()</code> method does not cause the default behavior of an event to occur (such as a form submission).</li>
19+
<li>The <code>.triggerHandler( "event" )</code> method will not call <code>.event()</code> on the element it is triggered on. This means <code>.triggerHandler( "submit" )</code> on a form will not call <code>.submit()</code> on the form.</li>
2020
<li>While <code>.trigger()</code> will operate on all elements matched by the jQuery object, <code>.triggerHandler()</code> only affects the first matched element.</li>
2121
<li>Events triggered with <code>.triggerHandler()</code> do not bubble up the DOM hierarchy; if they are not handled by the target element directly, they do nothing.</li>
2222
<li>Instead of returning the jQuery object (to allow chaining), <code>.triggerHandler()</code> returns whatever value was returned by the last handler it caused to be executed. If no handlers are triggered, it returns <code>undefined</code></li>

0 commit comments

Comments
 (0)