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

  • Home
  • SEARCH
  • 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 6845419
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 27, 20262026-05-27T00:29:54+00:00 2026-05-27T00:29:54+00:00

I am trying to slide down a sub menu when hovering over a#about and

  • 0

I am trying to slide down a sub menu when hovering over a#about and keep the sub menu visible until hovering over another option.

I also want to hide the sub menu if not hovering over a#about or nav#about. Help please.

$(document).ready(function () {
    $('a#about').hover(function(){
        $('nav#about').slideDown();
    });

    $('nav#about').hover(function(){
        $('nav#about').slideDown();
    });

    $('a#home').hover(function(){
        $('nav#about').slideUp();
    });

    $('a#products').hover(function(){
        $('nav#about').slideUp();
    });

    $('a#contact').hover(function(){
        $('nav#about').slideUp();
    });
});

=========================================
edited to include the html

<nav id="main" class="left">
    <a id="home" class="left active">Home</a>
    <a id="about" class="left" href="#">About</a>
    <a id="products" class="left" href="#">Products</a>
    <a id="contact" class="left" href="#">Contact</a>
</nav>

<nav id="about" class="left">
    <a href="#"></a><br />
    <a href="#"></a><br />
    <a href="#"></a><br />
    <a href="#"></a><br />
    <a href="#"></a><br />
</nav>
  • 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-27T00:29:55+00:00Added an answer on May 27, 2026 at 12:29 am

    I am trying to slide down a sub menu when hovering over a#about and
    keep the sub menu visible until hovering over another option

    Assuming all navigation divs have class attribute of nav and the navigation links are wrapped in a div or nav tag like this:

    <div id="navigation">
        <a id="about" ...>About</a>
        <a id="home" ...>Home</a>
        <a id="products" ...>Products</a>
        <a id="contact" ...>Contact</a>
        <div class="nav" id="div-about" ...>...</div>
    </div>
    

    you can do something like this:

    var menuTimeout;
    $('#navigation a, #navigation .nav').hover(function() {
        hovered_div = $('#navigation #' + 'div-' + $(this).attr('id').replace('div-',''));
        $('#navigation .nav').not(hovered_div).hide();
        (hovered_div.css('display') == 'none') && hovered_div.slideDown();
        clearTimeout(menuTimeout);
    }, function() {
           menuTimeout = setTimeout(function() { $('#navigation .nav').slideUp(); }, 1000);
       });
    });
    

    It basically binds to hover event of anchors and elements of nav class and hides all the nav divs except the current div (the hovered one) and slidesDown the hovered div if it’s not visible, also when navigation divs or anchors are not hovered, it slides up the divs after 1 second using setTimeout().

    See the Demo.

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

Sidebar

Related Questions

I'm trying to create a drop-down menu acting as the sub-menu of a main
Hihi, I am trying to create a slide down menu using DIV, but hit
I'm trying to have some menu items slide down when a user hovers on
I'm trying to figure out how to make jQuery slide #content2 down and replace
I'm trying to find/make a good jquery drop-down menu with animation (fadein/fadeout or slidedown)
I'm trying to have a UIPickerView slide from the bottom of the screen (over
I'm trying to use the same function to slide up and down a text
I'm trying to do a proper slide-down animation. The view that slides down should
basically I'm trying to get #toggle_box to slide down using Jquery, the code below
I'm trying to find a way to slide down a div and change the

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.