View Single Post
Old 02-11-2013, 07:59 PM   PM User | #1
m2244
Regular Coder

 
Join Date: Jun 2012
Posts: 129
Thanks: 1
Thanked 1 Time in 1 Post
m2244 is an unknown quantity at this point
Is there a better way to capture mouse

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?
m2244 is offline   Reply With Quote