tags:

views:

80

answers:

2
<a id="clickme">here</a>

when I click on the link,I want to get the coordinate where click happens.

how to do that with jQuery?

+3  A: 

http://docs.jquery.com/Tutorials:Mouse%5FPosition

Just add an (e) on your click callback and use e.pageX and e.pageY, I think

Sean Clark Hess
+3  A: 

This should work,

$(document).ready(function(){
   $("#clickme").click(function(e){
      alert(e.pageX +', '+ e.pageY);
   }); 
});
kayteen