Hi, I was wondering if anyone could help me out of this. I have spent much of the time for the following issue.
I have a button that opens up a drop down list when MOUSE_OVER event occurs. To delay the opening of a drop down list I have used setTimeout function in the event listener so that it is called after 1 sec.
setTimeout(functionToBeCalled, 1000, event);
In this case if a user moves mouse over that button the event gets fired after 1000ms.
But if user unknowingly moves the mouse and if it happens to move across that button the event gets fired no matter where the mouse is at present.
What I want is the event should be fired only if the Mouse is over that button for 1000ms. If I move away the mouse, say, within 500 ms from that button that event shouldn't be fired.
Any help would be greatly appreciated.