<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?
<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?
http://docs.jquery.com/Tutorials:Mouse%5FPosition
Just add an (e) on your click callback and use e.pageX and e.pageY, I think
This should work,
$(document).ready(function(){
$("#clickme").click(function(e){
alert(e.pageX +', '+ e.pageY);
});
});