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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 2, 20262026-06-02T04:39:46+00:00 2026-06-02T04:39:46+00:00

I have a standard drop-down menu that uses jQuery to hide the children li

  • 0

I have a standard drop-down menu that uses jQuery to hide the children li elements. However, upon loading the site, the child elements quickly appear and subsequently disappear (sort of like a quick flash). I don’t think this is at all related to the flash-of-unstyled-content known issue.

The site is in Hebrew, but that shouldn’t affect anything. The site is located here

If you’d like a sample HTML + CSS and the Javascript code, I would gladly post it here.

I was just wondering if anyone has encountered this issue before. I’m seeing it in Chrome, and I haven’t really checked if it also happens in IE and Firefox.

Thanks!

EDIT: HTML/CSS/JS shown below:

HTML:

<ul class="menu">
  <li><a href="#">blah</a>
    <ul class="sub-menu">
      <li><a href="#">blah</a></li>
    </ul>
  </li>
</ul>

CSS:

/* NAVIGATION -- level 1 */
ul.menu { float: right; list-style-type: none; font-size: 15px; margin-top: 50px; }
ul.menu > li{ float: right; display: inline; position: relative; margin-left: 30px; }
ul.menu li > a { display: block; color: #5c5d5f; text-decoration: none; border-bottom: solid 1px #9b9a95;  }

ul.menu li:hover > a, ul.menu li a:hover , ul.menu li.current_page_item > a { color: black; }
body.home .current_page_item > a { }
body.home .current_page_item > a:hover { }

/* NAVIGATION -- level 2 */
ul.menu li > div { display: none; width: 157px; height: 171px; margin-right: -10px; position: absolute; opacity:0; background: url(images/subNav_bg.png) no-repeat top right; }

ul.menu li > div span { height: 15px; background: transparent; display: block; } /* used to push down the menu */

JS:

// navigation menu //
// add hasSubMenu to each li that has one //
$('.menu > li').has('ul').addClass('hasSubMenu');

// wrap with <div> //
$('li.hasSubMenu > ul').wrap('<div />');
$('ul.menu li > div').css('display', 'none');
$('ul.menu li > div').prepend('<span></span>');
$('li.hasSubMenu > a').click(function () {
    return false;
});

// add class to <div> for extendedBg //
$('li.extendedBg').find('div').addClass('subBg2');

$('li.hasSubMenu').hover(function () {
    // hover on
    $(this).addClass('hover').find('div').stop().fadeTo("medium", 1, /* when done fading */
        function () {
            $(this).find('div').css('display', 'block');
            //$(this).find('ul').css('display','block');
        }
    );

}, function () {
    // hover off
    $(this).removeClass('hover').find('div').stop().fadeOut();
});
  • 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-02T04:39:48+00:00Added an answer on June 2, 2026 at 4:39 am

    Set the dropdown menu as display: none in the page’s CSS or directly in the element itself using style="display:none". This will hide it as the page loads.

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

Sidebar

Related Questions

I have a range of items in an HTML drop-down menu that I need
I have a requirement to add a standard drop-down from which you can select
I have a mobile site running with jQuery Mobile. I want to have standard
I have the standard content editor that uses an iFrame as the text area
I have a standard webpage containing an UpdatePanel, and a button. Upon loading the
Many languages have standard repositories where people donate useful libraries that they want others
I have a standard windows server that inherits from the ServiceBase class. On the
I have a standard MOSS 2007 Web Site (MOSS Terminology: Application and a SiteCollection)
See ,I have drop down control and i have keep the LIST as datasource.
I have a form that submits parameters using standard HTML controls to a PHP

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.