Code snippet event method using click and double click of mouse in JQuery

Amatya
Posted by Amatya under jQuery category on | Points: 40 | Views : 1506
click()

The function is executed when the user clicks on the HTML element.
The following example says: When a click event fires on a <p> element; hide the current <p> element:

Example
$("p").click(function(){
$(this).hide();
});


dblclick()
The function is executed when the user double-clicks on the HTML element.

Example
$("p").dblclick(function(){
$(this).hide();
});


Thanks
Amatya

Comments or Responses

Login to post response