jquery - Hover any link then hide certain div -


i summarize issue: http://jsfiddle.net/marciano/bszan/

i have links

<a href="">some text 1</a> <a href="">some text 2</a> <a href="">some text 3</a> <a id="menu" href="">menu</a> <a id="submenu" href="">submenu</a> 

and js

$(function() {       $('#submenu').hide();       $('#menu').hover( function() { $('#submenu').show(); } ); }); 

when hover menu, submenu shows up.

what need hide 'submenu' when hover of other links 'menu'. thank you

try this:-

demo

   $(function () {     $('#submenu').hide();     $('#menu').hover(function () {         $('#submenu').show();     });     $('a:not(#menu,#submenu)').hover(function () {         $('#submenu').hide();     }) }); 

Comments

Popular posts from this blog

Perl - how to grep a block of text from a file -

delphi - How to remove all the grips on a coolbar if I have several coolbands? -

javascript - Animating array of divs; only the final element is modified -