It helps to attach one or more event handlers for selected elements, and specifies a function to run when the event occurs.
// To add a click event to the < p> element:.
$(“p”).bind(“click”,function(){
alert(“The paragraph was clicked.”);
});