The difference is that the onmouseleave event does not bubble (does not propagate up the document hierarchy). The negative part is that you'll clobber any existing classes if you remove al of them - so removeClass() is a helper that checks for that particular class in the array of classes and removes just that one. So there is no problem here. I added the changes I mentioned to a fiddle. } Returns true if the control key was down when the mouse event was fired. open close open close.
element: The mouseout event occurs when the mouse pointer leaves the selected element.