jQuery trigger() Method
jQuery trigger() Method
The trigger() method is used to trigger the specified event and the default behavior of an event for the selected elements. It is similar to the triggerHandler() method. However, triggerHandler() does not trigger the default behavior of the event.
Syntax:-
Its syntax is:- $(selector).trigger(event, eventObj, param1,...)
Further Explanation:-
Parameter | Description |
---|---|
event | Required. Specifies the event to trigger for the specified element. |
param1,... | Optional. Additional parameters to pass on to the event handler. |