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() method syntax

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:

jquery triggerHandler() method example

    

请注意,与 trigger() 方法不同,triggerHandler() 方法不会引起所发生事件的默认行为(文本不会被选中)。

Run instance »

Click the "Run instance" button to view the online instance

About us Disclaimer Sitemap
php.cn:Public welfare online PHP training,Help PHP learners grow quickly!
Parameter Description event Required. Specifies the event to be triggered by the specified element . ##[param1,param2,...]
Optional. Extra parameters to pass to the event handler.