Valid XHTML 1.0 Transitional

jQuery: Getting event type

Click the flower...

Hibiscus flower


The jQuery Code START
    
    <script src="http://code.jquery.com/jquery-latest.js"></script>
    <script type="text/javascript">
      $(function() {
          $('#target').bind('click', clicker);
      });

      function clicker(event) {
          $('#p1').text('Event type: ' + event.type);
      }
    </script>
  </head>

  <body>
    <h1>Getting event type</h1>
    <h3>Click the flower...</h3>
    <img id="target" src="Image1.jpg"/>
    <p id="p1"></p>
    
    <br />