Follow w3schools
The triggerHandler() method is similar to the trigger() method. Except that it does not trigger the default behavior of an event (like form submission) and it only affects the first matched element.
But I test with 2 input tag and use
$("input").triggerHandler("select");
then both of them are affected . Here's my code:
HTML:
<input type="text" name="FirstName" value="Hello World" />
<input type="text" name="FirstName" value="Hello" />
JavaScript:
$(document).ready(function(){
$("input").select(function(){
$("input").after(" Input select event occured!");
});
$("button").click(function(){
$("input").triggerHandler("select");
});
});