{"name":"triggerHandler","type":"method","title":".triggerHandler()","deprecated":null,"removed":null,"desc":"Execute all handlers attached to an element for an event.","categories":["events/event-handler-attachment","version/1.2"],"entries":[{"return":"Object","signatures":{"added":"1.2","argument":[{"desc":"A string containing a JavaScript event type, such as click or submit.","name":"eventType","type":"String"},{"desc":"An array of additional parameters to pass along to the event handler.","name":"extraParameters","optional":"true","type":"Array"}]},"examples":{"desc":"If you called .triggerHandler() on a focus event - the browser's default focus action would not be triggered, only the event handlers bound to the focus event.","code":"\n$( \"#old\" ).click(function() {\n $( \"input\" ).trigger( \"focus\" );\n});\n$( \"#new\" ).click(function() {\n $( \"input\" ).triggerHandler( \"focus\" );\n});\n$( \"input\" ).focus(function() {\n $( \"Focused!\" ).appendTo( \"body\" ).fadeOut( 1000 );\n});\n","html":"\n\n

\n\n\n"},"longdesc":"\n

The .triggerHandler() method behaves similarly to .trigger(), with the following exceptions:

\n \n

For more information on this method, see the discussion for .trigger().

\n "}]}