// Determine where mouse position is then output coordinates into two separate divs.
$(document).mousemove(function(e) {
currentMousePosX = e.pageX;
currentMousePosY = e.pageY;
$('#mouseX').text(currentMousePosX);
$('#mouseY').text(currentMousePosY);
});
Determine where mouse position is then output coordinates into two separate divs.
1 Response
Write a comment
You can use [html][/html], [css][/css], [php][/php] and more to embed the code. Urls are automatically hyperlinked. Line breaks and paragraphs are automatically generated.