this script fadeIn fadeout many time whenever user hover on it or it’s fade in out for long time even user goes elsewhere in page.
how i can stop this menu to fadein fadeout when it’s already in progressed or user goes elsewhere
var mainMenu = $("#menu > li");
mainMenu.children("ul").hide();
mainMenu.hover(function () { $(this).children("ul").fadeIn(150); }, function () { $(this).children("ul").fadeOut(150); });
You must call stop jquery function. In order to work it will be
and