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

Winapi c++: DialogBox hangs when breaking a loop -

vb.net - Font adding using PDFsharp -

javascript - jQuery iScroll clickable list elements while retaining scroll? -