jquery triggerHandler() method
Translation results:
trigger
UK[ˈtrɪgə(r)] US[ˈtrɪɡɚ]
n. (gun) trigger; starting device, trigger; triggering other events One thing; [Electronics] Trigger, trigger electrical appliance
vt. Cause, trigger; pull the trigger of...; launch or cause explosion (weapons or explosive ammunition)
Handler
Handler
jquery triggerHandler() methodsyntax
Function: triggerHandler() method triggers the specified event type of the selected element. However, the browser's default action will not be executed, and event bubbling will not occur. The triggerHandler() method is similar to the trigger() method. The difference is that it does not trigger the default behavior of events (such as form submission), and only affects the first matching element.
Note: The difference with tigger() is that it will not cause the default behavior of events (such as form submission).trigger() will operate all elements matched by the jQuery object, while .triggerHandler( ) only affects the first matching element. Events created by .triggerHandler() do not bubble up the DOM tree; if the target element does not handle them directly, nothing happens. This method returns the return value of the event handling function, not the chainable jQuery object. Additionally, if no handler is triggered, this method returns undefined.
Trigger event: Specifies the event to be triggered by the selected element.
Syntax: $(selector).triggerHandler(event,[param1,param2,...]
##Parameters:
Description | |
Required. Specifies the event to be triggered by the specified element . | |
Optional. Extra parameters to pass to the event handler. |