.bind() in jQuery

It helps to attach one or more event handlers for selected elements, and specifies a function to run when the event occurs.

.bind()

// To add a click event to the < p> element:.

$(“p”).bind(“click”,function(){
    alert(“The paragraph was clicked.”);
});