a blog dedicated to creative design solutions, webdesign tips and many more..

Tuesday, June 7, 2011

How to identifying & locating mouse position in jQuery

TO get the mouse cursor position using jQuery use below code.
T document is ready to be manipulated, we'll listen for when the user moves his or her mouse (mousemove).
$(document).ready(function(){

$(document).mousemove(function(e){
$('#status').html(e.pageX +', '+ e.pageY);
});
})
In HTML =  apply id=status  to a block tag




jQueryexample

0 comments: