Mouse Coordinates
One thing that has really irritated me lately is trying to find a decent script to get the co-ordinates of the mouse cursor when mousing over a specific portion of a page e.g. trying to create a simple mouseover menu. All the scripting examples I've been able to find all require you to trap the mousemove event.
So - after much searching - for your edification and my own I present:
The definitive guide to getting where the heck your mouse is on a mouseover - or something to that effect
var mouseLeft = event.clientX;
var mouseTop = event.clientY;
And it's as simple as that!
So - after much searching - for your edification and my own I present:
The definitive guide to getting where the heck your mouse is on a mouseover - or something to that effect
var mouseLeft = event.clientX;
var mouseTop = event.clientY;
And it's as simple as that!
0 Comments:
Post a Comment
<< Home