So I am capturing the mouse X and Y positions like this:
Code:
$(document).ready(function(){
$(document).mousemove(function(e){
mouseX = e.pageX
});
});
And then later, when a user hovers over a link, I want to have a tool tip show up near their cursor.
My question is; Is there a better way to capture the mouse position other than constantly listening for the mouse move? Can I add the mouseMove listener to the link in question?