Javascript examples for jQuery:Mouse Event
Show number of clicks
<html> <head> <meta name="viewport" content="width=device-width, initial-scale=1"> <script type="text/javascript" src="https://code.jquery.com/jquery-1.11.0.js"></script> <script type="text/javascript"> $(function(){// w ww . j a va2 s .co m $(function(){ $("p").click(function(){ $(this).html(+this.textContent + 1); }); }); }); </script> </head> <body> <p>0</p> </body> </html>