I know that I can track when the mouse is moved like this:
$("body").mousemove( function(e){
alert( "You moved to WIDTH " + e.pageX );
} );
Ok. I wanna be able to tell whether the mouse pointer was moved to left or to the right.
I know that to do this, I’ll have to know the previous mouse position and simply compare it to the current. But how can I do this?
DEMO: http://jsfiddle.net/tb86F/