I want to create an event that triggers only when the mouse moves from left to right or viceversa. I tried with creating a variable and setting it at ondragstart and than another variable set at ondrop. then I tried with comparing the two variables. if the first is less than the second than the mouse is moving from left to right but it doesn't work. the event created doesn't trigger anything. what am I doing wrong?