Demonstrate how to handle click and double-click on a paragraph. Note: As the coordinates are window relative, so in this case relative to the demo iframe using jquery
.toggleClass() : Add or remove one or more classes from each element in the set of matched elements, depending on either the class’s presence or the value of the state argument.
.bind() : Attach a handler to an event for the elements.
HTML Code :
JavaScript Code :
Used Methods :