Mousedown calling my function - Javascript jQuery Method and Property

Javascript examples for jQuery Method and Property:mousedown

Description

Mousedown calling my function

Demo Code

ResultView the demo in separate window

<html>
   <head> 
      <meta name="viewport" content="width=device-width, initial-scale=1"> 
      <script type="text/javascript" src="https://code.jquery.com/jquery-1.8.3.js"></script> 
      <script type="text/javascript">
    $(function(){/*w  w  w.ja  va2s. c o  m*/
var n = 0;
$("span").click(function(){
    $(this).text($(this).text() + " " + n++);
});
    });

      </script> 
   </head> 
   <body> 
      <span>Click Me</span> 
      <br> 
      <span>Click Me</span>  
   </body>
</html>

Related Tutorials