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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 26, 20262026-05-26T20:53:07+00:00 2026-05-26T20:53:07+00:00

I have a rolldown menu that has an undesirable flashing effect. At the top

  • 0

I have a rolldown menu that has an undesirable flashing effect. At the top of the page I hide the menu to animate it later with a roll down effect. The problem is that the hiding isn’t done fast enough. This causes all the roll down menus to flash before being hidden. What is the way to fix that?

At the top of the HTML page I have this to hide the menus.

<script type="text/javascript">
$(function(){
  $("#navigation li div").hide(1);
});
</script>

I open roll down menus in the onclick event for a menu item in the navigation.

// open hidden layer
function mopen(id)
{   
    var tableft = $("#navigation li:hover").offset().left;
    var menuwidth = $("#navigation li:hover").width() - 2;
    $('#'+id).css('width',menuwidth);
    $('.tabtop').css('left',tableft);
    $('.tabtop').css('width',menuwidth+2);
    $('.tabtop').css('visibility','visible');

    // cancel close timer
    mcancelclosetime();

    // close old layer
    if ( oldid != "") { 
       $('#'+oldid).stop(true, true).animate({'height': 'hide'}, 400);
    }

    // get new layer and show it
    $('#'+id).stop(true, true).animate({'height': 'show'}, 400);
    oldid = id;
}

That animation has the right effect. What I want to fix is the flashing. I don’t want the menus to show at all before the animation. If I hide them in the CSS. Then, I’d have to keep toggling the display information.

#navigation li div {
    position: relative;
    display: inline-block;
    margin: 0 0 0 0;
    padding: 0 0 0 0;
    padding-top: 0px;
    padding-bottom: 0px;
    background: #EAEBD8;
    border: 1px solid #990000;
    z-index: 99999;
}

How do I create the roll down without the flashing?

  • 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-26T20:53:08+00:00Added an answer on May 26, 2026 at 8:53 pm

    You don’t need to pass a duration argument to jQuery’s $.hide() method, you can simply do the following to hide the divs without a delay:

    $(function(){
      $("#navigation li div").hide();
    });
    

    I would also suggest you look at jQuery’s $.slideToggle() method to simplify the hiding and display of the menus.

    Good luck!

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

Sidebar

Related Questions

Does anyone have any idea how one could animate a panel such that it
Have a bunch of WCF REST services hosted on Azure that access a SQL
Have a look at one of my websites: moskah.com The problem is that it
Have some dates in my local Oracle 11g database that are in this format:
Have an app that can use tts to read text messages. It can also
Have a fun issue with sharepoint calendar view filtering. That code works fine: SPSecurity.RunWithElevatedPrivileges(delegate()
Have started playing with Xcode 4.2, and created a single page application using storyboard
Have a rails app that is supposed to display a list of products/managers. After
Have a (rather complex) app that works fine on iOS 4 but fails on
Have a look at this jsfiddle: http://jsfiddle.net/Dh96F/1/ The Expand button will animate the widening

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.