Getting mouse position in major internet browswers with javascript
Posted
by strakastroukas
on Stack Overflow
See other posts from Stack Overflow
or by strakastroukas
Published on 2010-05-25T10:21:17Z
Indexed on
2010/05/25
10:41 UTC
Read the original article
Hit count: 260
I read this article regarding creating popup notes with javascript and css
The problem is that this one works only in IE since window.event is undefined in Firefox.
// assigns X,Y mouse coordinates to note element
note.style.left=event.clientX;
note.style.top=event.clientY;
So could you point me a fully working example? Or at least, how could i modify the javascript code to make it work in both internet browsers?
© Stack Overflow or respective owner