Jquery slide-out bottom-top mouseover menu problem on loading a new page -


i'm struggling converting menu mootools jquery. there various reasons why have switch js framework , need here because quite new jquery.

first working mootools version on live site: http://www.kieleconomcis.de

as can see menu moves on hover, reveals sub menu , stays up when click link , load page.

now have convert jquery want able control heigth of each menu individually, a) looks more bar graph , b) can place 4 submenus :)

i played around, copy&pasted, tried&errored , ended fiddle here.

my problem - guess - have $('div.nav_body').hide(); need tell it has ignore effect if element before has id="visible"

here of code can see need trigger:

    <h4 id="visible">Über uns</h4>         <div id="nav2-body" class="nav_body"> 

thanks adice.

using :not() , :has() selector works:

$('div.nav_container:not(:has(#visible)) .nav_body').hide(); 

the filter() method works well:

$('div.nav_body').filter(function () {     return !$(this).prev().is("#visible"); }).hide(); 

or use .not() remove 1 submenu to-be-hidden items:

$('div.nav_body').not($("#visible").next()).hide(); 

i tested 3 in fiddle. can't 1 best, though.


Comments

Popular posts from this blog

java - SNMP4J General Variable Binding Error -

sql server - python to mssql encoding problem -

windows - Python Service Installation - "Could not find PythonClass entry" -