perform click jquery code example
Example 1: jquery click function
$( "#target" ).click(function() {
alert( "Handler for .click() called." );
});
Example 2: jquery trigger
$( "#foo" ).on( "click", function() {
alert( $( this ).text() );
});
$( "#foo" ).trigger( "click" );
$( "#foo" ).on( "custom", function( event, param1, param2 ) {
alert( param1 + "\n" + param2 );
});
$( "#foo").trigger( "custom", [ "Custom", "Event" ] );
Example 3: on click jquery
$( "#target" ).click(function() {
alert( "Handler for .click() called." );
});
Example 4: set onclick jquery
$(elem).click(myFunc());
Example 5: jq click with trigger load data
$( "#foo" ).trigger( "click" );