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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 6, 20262026-06-06T14:13:12+00:00 2026-06-06T14:13:12+00:00

Currently have a drop down menu that is activated on a hover (from display:none

  • 0

Currently have a drop down menu that is activated on a hover (from display:none to display:block in the CSS). It appears that the CSS is performed before the Jquery,however, because on the first hover, the drop down menu is not animated (i.e. it appears instantaneously) but on the second hover the Jquery’s slide down and slide up is properly performed. Why isn’t the Jquery getting applied on the first hover? I’ve found a solution that states that adding this line |$(‘.nav ul li ul’).css(‘display’,’block’).slideUp(0);| to the Jquery solves the issue but it does not for me…bear with my redundancy I’m learning this as I go.

Here is the HTML for the Menu:

<ul class="nav">
    <li><a href="#">...</a></li>
    <li><a href="#">Dropdown1</a>
        <ul>
            <li><a href="#">...</a></li>
            <li><a href="#">...</a></li>
            <li><a href="#">...</a></li>
            <li><a href="#">...</a></li>
            <li><a href="#">...</a></li>
        </ul>
    </li>
    <li><a href="#">Dropdown2</a>
        <ul>
            <li><a href="#">...</a></li>
            <li><a href="#">...</a></li>
            <li><a href="#">...</a></li>
            <li><a href="#">...</a></li>
        </ul>
    </li>
    <li><a href="#">...</a></li>
    <li><a href="#">...</a></li>
</ul>

My CSS:

.nav {
font-family: FrutigerLTStd-Roman, Trebuchet MS, Helvetica, Arial, sans-serif; 
font-size:16px; 
font-style: none; 
font-weight: normal; 
margin:0; 
list-style:none;
padding:0px 0px 0px 0px; 
z-index:600; 
text-align:center;
clear: both;
box-shadow: 0px 3px 3px 0px #888
background-clip: padding;
}
.nav a{
color:#FFF
background:#629ec4; 
display: block; 
font-weight: bold;
margin:0 0 0 0;
target-new:tab;
}
.nav li{ 
background:#629ec4;
margin:1px 0 1px 0;
border-top:0px solid;
border-right:0px solid;
border-bottom:0px solid;
z-index: 600;
float:left;
}
.nav li a:hover{
color:#0072bb;
}

.nav li ul{
list-style:none;
display:none;
position:relative;
z-index: 700;
background-color:#629ec4
}

.nav li:hover ul{
display:block;
border-top:2px solid;
}

.nav li:hover ul li {
clear:left;
}

.nav ul li:hover a{
color:#0072bb;
opacity: 1;
}

My Jquery:

$(document).ready(function () {  
    $('.nav ul li ul').css('display','block').slideUp(0);
    $('.nav li').hover(
    function () {
        //show its submenu
        $('ul', this).slideDown(300);
    },
    function () {
        //hide its submenu
        $('ul', this).slideUp(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-06T14:13:14+00:00Added an answer on June 6, 2026 at 2:13 pm

    I was unable to duplicate the issue you described, however, I made a few modifications in an attempt to clear up the issues you described.

    Added class to dropdown ul:

     <li><a href="#">Dropdown1</a>
         <ul class="dropdown">
        ...
    

    Updated CSS:

    .nav { 
        font-family: FrutigerLTStd-Roman, Trebuchet MS, Helvetica, Arial, sans-serif;
        font-size:16px;
        font-style: none;
        font-weight: normal;
        margin:0;
        list-style:none; 
        padding:0px 0px 0px 0px;
        z-index:600;
        text-align:center; 
        clear: both; 
        box-shadow: 0px 3px 3px 0px #888;
        background-clip: padding; 
    }
    .nav a{ 
        color:#FFF; 
        background:#629ec4;
        display: block;
        font-weight: bold; 
        margin:0 0 0 0; 
        target-new:tab; 
    }
    .nav li{
        background:#629ec4; 
        margin:1px 0 1px 0; 
        border-top:0px solid; 
        border-right:0px solid; 
        border-bottom:0px solid; 
        z-index: 600; 
        float:left; 
    }
    
    .nav li a {
        padding: 0 15px 0 15px;   
    }
    
    .nav li a:hover{ 
        background:#0072bb; 
        color: #fff;    
    }
    .nav li:hover .dropdown { 
        display:block; 
        border-top:1px solid; 
    }
    .dropdown { 
        list-style:none; 
        display:none; 
        position:relative; 
        z-index: 700; 
        background-color:#629ec4;  
    }
    .dropdown li {
        clear: both; 
        display: block;
        width: 100%;
    }
    .dropdown li:hover a{ 
        background:#0072bb; 
        color: #fff;
        opacity: 1; 
    }
    

    Working solution (slight modifications for illustrative purposes): JSFIDDLE

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

Sidebar

Related Questions

I have this drop down menu that when one menu is clicked if there
I've got a css-based horizontal drop down menu that works perfectly well, but I'm
I currently have a CSS <ul><li> dropdown menu that uses the following code. Unfortunately
I have a link that functions similar to a drop down menu in that
I have been building a CSS drop down menu and I have a slight
i have 4 menu drop down list that i bind a click that calls
I am currently looking into developing a CSS only drop down menu. The idea
I have an horizontal menu, which have a drop down menu on hover: The
I need to have a drop-down menu that allows you to select a year
I have a drop-down menu that are dynamically added through WordPress. It looks like

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.