Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 3799078
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 19, 20262026-05-19T13:40:34+00:00 2026-05-19T13:40:34+00:00

i’m struggling with converting a menu from mootools to jquery. there are various reasons

  • 0

i’m struggling with converting a menu from mootools to jquery. there are various reasons why i have to switch the js framework and i need some help here because i quite new to jquery.

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

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

now that i have to convert this into jquery i also want to be able to control the heigth of each menu individually, so it a) looks more like a bar graph and b) i can place 4 submenus 🙂

i played around, copy&pasted, tried&errored and ended up with this fiddle here.

my problem is – i guess – that i have a $('div.nav_body').hide(); but i need to tell it that it has to ignore the effect if the element before it has an id="visible"

here is some of the code so you can see what i need to trigger:

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

thanks for any adice.

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-19T13:40:35+00:00Added an answer on May 19, 2026 at 1:40 pm

    Using the :not() and :has() selector works:

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

    The filter() method works as well:

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

    Or use .not() to remove the one submenu from the to-be-hidden items:

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

    I tested all three in your fiddle. I can’t really say which one I like best, though.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

link Im having trouble converting the html entites into html characters, (&# 8217;) i
I have just tried to save a simple *.rtf file with some websites and
I have a bunch of posts stored in text files formatted in yaml/textile (from
I have some data like this: 1 2 3 4 5 9 2 6
I need to clean up various Word 'smart' characters in user input, including but
Does anyone know how can I replace this 2 symbol below from the string
this is what i have right now Drawing an RSS feed into the php,
I'm trying to decode HTML entries from here NYTimes.com and I cannot figure out
I have a French site that I want to parse, but am running into
I'm parsing an RSS feed that has an &#8217; in it. SimpleXML turns this

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.