Using the script.aculo.us Effect.Highlight on an onMouseOver event works perfectly - if the user only mouses over the DIV once. If they mouse back over the DIV during the execution of the effect, another Effect gets scheduled (or runs in parallel, depending on whether or not
{queue: 'end'}
is enabled).
Does script.aculo.us have a built-in way of preventing this from happening, so that the DIV will only highlight itself if the user mouse's over the DIV at a resting state? Otherwise I guess I could keep a state variable that gets restored to 'resting':
afterFinish: function(obj) { resting = true; }
I've noticed similar situations before: for example, Effect.Shake, if called multiple times, causes the DIV to shake in a wider frame.
Also, this problem can be seen on the demo site if you click the demo multiple times in rapid succession: click to see demo