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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 17, 20262026-06-17T21:47:37+00:00 2026-06-17T21:47:37+00:00

Below is a script with a few bugs and I am trying to work

  • 0

Below is a script with a few bugs and I am trying to work out the kinks. The main bug is a confusion or mix-up between currently selected(hovered) items’ sub-menus and previously selected sub-menus.

jQuery(document).ready(function($) {
    $("ul.menu > li").hover(
        function() {
            $(this).find("ul.sub-menu").stop().animate({
                height: 'toggle',
                opacity: 'toggle'
            });
        }
    );
});

The bug doesn’t appear on the initial hover of each parent item but seems to only happen, as can be seen from this fiddle, if hovered over the 2nd parent item, then hover the 1st parent, and then quickly hover into 1st sub-menu, you will see the desired sub-menu disappear, and the previously selected sub-menu reappears. Also, I should also add that if hovered over the 3rd parent item, then hover over the 2nd parent, and then quickly hover into 2nd sub-menu, you will again see the undesired effects, or bug.

Another less detailed bug or glitch is that after the right combination or amount of random hovers 1 of 3 sub-menus permanatly disappears. Basically, the script is very unstable; how can I make this script a rock solid UI? How can these bugs be eliminated to ensure the best UX? Thanks.

  • 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-17T21:47:38+00:00Added an answer on June 17, 2026 at 9:47 pm

    Problem is that you are catching the second sub menu while it is still visible and it counts as hovering it once again.

    You can solve this pretty easily by updating the z-index for the sub-menu corresponding to the hovered element:

    $("ul.sub-menu").css('z-index', 1);
    $(this).find("ul.sub-menu").css('z-index', 2).stop()...
    

    http://jsfiddle.net/pF8wZ/6/

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

Sidebar

Related Questions

Below is my shell script from which I am trying to invoke few hive
i am trying to run the below script SELECT field_value FROM jos_js_res_record_values jrv INNER
StackOverflow, Below is the first few lines of my script: from ConfigParser import SafeConfigParser
I am new to Ruby and currently trying a few examples from the Ruby
I have created the jQuery Script below, But am having a few problems converting
I'm confused why the script below doesn't work... It appends the div (import_box) and
I have this little script repeated below in my code a few times. I
Below I am trying to write a script the goal of which is to
I am using a jQuery script and the main part is below. It allows
I am using the PHP script below to test FTP connections. Currently it is

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.