jQuery Tip: How to get mouse cursor position
Below jQuery code block will provide X and Y position of mouse cursor.
$(document).ready(function(){
$(document).mousemove(function(e){
$('#spnCursor').html("X Axis : " + e.pageX + " Y Axis : " + e.pageY);
});
});
Below jQuery code block will provide X and Y position of mouse cursor.
$(document).ready(function(){
$(document).mousemove(function(e){
$('#spnCursor').html("X Axis : " + e.pageX + " Y Axis : " + e.pageY);
});
});
0 comments:
Post a Comment