jQuery triggerHandler( event, [data] ) Method

« Previous Chapter Next Chapter »


The triggerHandler( event, [data] ) method triggers all bound event handlers on an element (for a specific event type) WITHOUT executing the browser's default actions, bubbling, or live events.

This method behaves very similarly to the trigger method, with two major exceptions:

  • First: No default browser actions are triggered, the triggered event does not bubble, and live events aren't triggered.

  • Second: The event is only triggered on the first element within the jQuery collection.

This method returns the return value of the triggered handler instead of a chainable jQuery object.


Here is the simple syntax to use this method:


selector.triggerHandler( event, [data] )


Here is the description of all the parameters used by this method:

  • event: An event object or type to trigger.

  • data : This is an optional parameters and represents additional data to pass as arguments (after the event object) to the event handler.



   <script type="text/javascript"  src="../../js/jquery-2.2.0.js"></script>
   <script type="text/javascript" language="javascript">
   $(document).ready(function() {
   <button id="old">.trigger("focus")</button>
   <button id="new">.triggerHandler("focus")</button><br/><br/>
   <input type="text" value="To Be Focused"/>
Code It Online

« Previous Chapter Next Chapter »

Have Any Suggestion? We Are Waiting To Hear from YOU!

Your Query was successfully sent!