How to trigger other elements event handler with jQuery

jQuery comes with a trigger() function to execute the event handlers that attached to elements. For instance, A single click event bind to a button with an Id of “button1”. $("#button1").bind("click", (function () { alert("Button 1 is clicked!"); })); A single click event bind to a button with an Id of “button2”. and a trigger …

Read more

jQuery bind() and unbind() example

jQuery bind() function is used to attach an event handler to elements, while the unbind() is used to detached an existing event handler from elements. Examples Simple html code for the demonstration. <div id="BoxId"> Mouseover Me, Click Me or Double Click Me </div> <span></span> 1. bind() jQuery has full supports of the JavaScript event types …

Read more