title: Mouse click events - mouse coordinates on firefox
body: <p>I wanted to find out the co-ordinates of the mouse click event on the page. Wrote a little piece of JS which works well on Chrome but not on firefox. Seems the default global 'event' is not available in Firefox. Here is a smaller version of the code that worked on Chrome:</p>
  
  <pre><code> $("body").click(function() {
      if (event == undefined)  // for Chrome, 'event' is not undefined here
          var event = window.event;           
      var xx;
      var yy;
      if (event) {
      // Need this for Chrome (and IE)
          xx = event.x;
          yy = event.y;
      } else {  
        // firefox 
        // WHAT SHOULD I DO HERE?
      }
      console.log('Click called on body.' + xx + ':' + yy);
  }
  </code></pre>
  
  <p>What should I manage the firefox case? </p>
  
  <p>Thanks in advance for the help.</p>