Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR JAVASCRIPT

jquery trigger

$( "#foo" ).on( "click", function() {
  alert( $( this ).text() );
});
$( "#foo" ).trigger( "click" );

$( "#foo" ).on( "custom", function( event, param1, param2 ) {
  alert( param1 + "
" + param2 );
});
$( "#foo").trigger( "custom", [ "Custom", "Event" ] );
Source by api.jquery.com #
 
PREVIOUS NEXT
Tagged: #jquery #trigger
ADD COMMENT
Topic
Name
1+7 =