I'm using jQuery to toggle the visibility of a <div>
using the jQuery toggle method. The toggle is fired on the mouseenter and mouseleave event, thus creating the effect of the div to fold out on mouseenter and fold in on mouseleave. Problem is, if the user drags the mouse over the <div>
a few times and then leaves the <div>
, the div will toggle in and out several times. This can happen if the user accidentally moves around the mouse pointer in the <div>
are. Do anyone have any idea on how I can avoid this behavior?
Thanx!