javascript - jQuery Dropdown Mouseover two different elements -
i want create mouseover dropdown navigation (which works tap on mobile/ipad well) , have problem, menu in complete different div. not child of element.
jquery('.top-menu').on("mouseover",function(){ jquery(".top-menu-dropdown").stop().slidetoggle(200,'easeoutcubic'); });
the div triggering menu slides down .top-menu once hovered have problem have add top-menu-dropdown class it's closing user exits menu. , how can add short delay menu not closing cursor leaves it? (stopping timer when enter again ofc)
i write more using jquery hover function has both mouse on , mouse out built in shown below.
jquery('.top-menu').hover( // mouseover function(){ jquery(".top-menu-dropdown").stop().slidedown(200,'easeoutcubic'); }, // mouseout function(){ jquery(".top-menu-dropdown").stop().slideup(200,'easeoutcubic'); } );
replcace slideup , slidedown whatever direction :)
Comments
Post a Comment