$(document).ready(function() { $("button").click(function() { $("#content p").text("You just invoked the single-click event!"); $("button").text("Want to test double-click event? Double-click here!"); }); $("button").dblclick(function() { alert("You just invoked the double-click event!"); }); });
<h2>jCombat Demo - jQuery Events</h2> <div id="content"> <p>This is a paragraph.</p> </div> <button>Click me to hide paragraph</button>