JQuery Event-Trigger () method
JQuery Event Reference Manual
Instance
The Select event that triggers the INPUT element:
$ ("button"). Click (function () { $ ("input"). Trigger ("select");});
Definition and usage
The trigger () method triggers the specified event type for the selected element.
Triggering events
Specifies the event to be triggered by the selected element.
Grammar
$ (selector). Trigger (event, [param1,param2,...])
Try it yourself.
Parameters |
Description |
Event |
Necessary. Specifies the event to be triggered by the specified element. You can make custom events (using the bind () function to attach), or any standard event. |
[param1,param2,...] |
Optional. The extra parameters passed to the event handler. Additional parameters are particularly useful for custom events. |
Using the event object to trigger an event
Specifies the event to be triggered by the selected element that uses the event object.
Grammar
$ (selector). Trigger (EVENTOBJ)
Try it yourself.
Parameters |
Description |
EventObj |
Necessary. Specifies the function to run when an event occurs. |
JQ Analog Trigger Event