Home >>jQuery Tutorial >jQuery trigger() Method

jQuery trigger() Method

jQuery trigger() Method

jQuery trigger() method in jQuery is used to triggers the specified event for the selected elements and the default behavior of an event (like form submission).


Parameter Values

Parameter Description
event It is a required parameter and used to specifies the event to trigger for the specified element.
param1,param2,... It is an optional parameter and used to attach additional parameters to pass on to the event handler.
Here is an Example of jQuery trigger() Method:

<script src="https://ajax.googleapis.com/ajax/libs/jquery/3.4.1/jquery.min.js"></script>
$("input").after(" Text marked!");
<input type="text" value="Hello Phptpoint"><br><br>
<button class="btn1">Click me to trigger the select event</button>