How can I detect the mouse position ACCORDING TO ITS RELATIVE POSITION
I mean if I'm in the middle of the page and I log the mouse positionX
(I want to log 0
)
And if i moved the mouse to the left / right 1px
(I want to log 1
)
How can I do that? I searched alot and all I found clientX; pageX; offsetLeft; etc..
Thanks all