trigger

UK[ˈtrɪgə(r)] US[ˈtrɪɡɚ]

n. (gun) trigger; starting device, trigger; triggering other events One thing; [Electronics] trigger, trigger electrical appliance

vt. trigger, trigger; pull the trigger of...; launch or cause explosion (weapons or explosive ammunition)

jquery trigger() method syntax

Function:trigger() method triggers the specified event type of the selected element.

Trigger event:Specifies the event to be triggered by the selected element.

Syntax:$(selector).trigger(event,[param1,param2,...])

Parameters:

Parameters Description
event Required. Specifies the event to be triggered by the specified element. It is possible to make custom events (attached using the bind() function), or any standard events.
[param1,param2,...] Optional. Additional parameters passed to the event handler. The extra parameters are especially useful for custom events.

Use the Event object to trigger events:Specify the event to be triggered by the selected element using the event object.

Syntax:$(selector).trigger(eventObj)

Parameters:

Parameter Description
eventObj Required. Specifies a function to run when an event occurs.

jquery trigger() method example

    

Run instance »

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