Handle anchor click event - Javascript jQuery

Javascript examples for jQuery:Mouse Event

Description

Handle anchor click event

Demo Code

ResultView the demo in separate window

<html>
   <head> 
      <script src="https://code.jquery.com/jquery-1.9.1.js"></script> 
   </head> 
   <body> 
      <a id="aLink">First Paragraph</a> 
      <script>
    $("#aLink").click(function () {
        console.log("Calling function");
    });//  w  ww.  ja v a  2  s .  c om

      </script>  
   </body>
</html>

Related Tutorials