It helps to bind an event handler to the “click” JavaScript event, or trigger that event on an element.
// if we click on this element, the alert is displayed
$( “#target” ).click(function() {
alert( “Handler for .click() called.” );
});
It helps to bind an event handler to the “click” JavaScript event, or trigger that event on an element.
// if we click on this element, the alert is displayed
$( “#target” ).click(function() {
alert( “Handler for .click() called.” );
});