$( document ).ready(function() { $( "#foo" ).bind( "click", function( event ) { alert( "The mouse cursor is at (" + event.pageX + ", " + event.pageY + ")" ); }); });