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 7862387
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 2, 20262026-06-02T23:06:44+00:00 2026-06-02T23:06:44+00:00

I make a script for my submenu in the navigation. When i open the

  • 0

I make a script for my submenu in the navigation. When i open the submenu. The submen is show and when i mouseout. The submenu is closed width a delay of 300.

But i have a problem in the script. The navigation have 8 submenu’s. When i hover over the first submenu. This submenu is open. When i hover over the second submenu. Than i have two submenu’s open.

When I open a new submenu. And there is another submenu open. The other sub should immediately close. How can I make?

Thanks a lot!

This is my script:

    $('.nav-main .container li').hover(function() {
    if ($(this).find('.submenu').length > 0) {
        $(this).addClass("hover");
        $(this).find('.submenu').show();
    }
}, function() {
    var object = $(this);
    setTimeout(function()
    {
        $(object).find('.submenu').hide();
        $(object).removeClass("hover");
    }, 300);
});
  • 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-06-02T23:06:45+00:00Added an answer on June 2, 2026 at 11:06 pm

    Before showing submenu you can hide all of submenu first;

    if ($(this).find('.submenu').length > 0) {
            $(this).addClass("hover");
            $('.submenu').hide();//Here
            $(this).find('.submenu').show();
        }
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I have make a script. That open my submenu in the navigation. When you
I have make this script: $(#comments .comment .links).hide(); $(#comments .comment).hover( function() { $(.links, this).stop(true).slideDown(300);
i have this show/hide menu. It is possibly this menu make with memory?( I
I make some script, that have modal window on fancybox and on load it's
I wanted to make this script work somehow, but i find that after you
I'm trying to make a script to run my Rails dev server, but the
I have make a script by using jQuery such as : $(document).ready(function() { $('a[name=pmRead]').click(function(e)
I have to make a script in PHP that will scan other PHP files
I have problem to set or show date in datepicker textbox at firsttime I
I have make a script. That set li items on different positions on 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.