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

Popular posts from this blog

java - Plugin org.apache.maven.plugins:maven-install-plugin:2.4 or one of its dependencies could not be resolved -

Round ImageView Android -

How can I utilize Yahoo Weather API in android -