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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 16, 20262026-06-16T15:37:18+00:00 2026-06-16T15:37:18+00:00

I have a jquery/css drop down menu that I am working on for a

  • 0

I have a jquery/css drop down menu that I am working on for a website. It works well, except that when you navigate between sub-menu items, the selected main menu item changes it’s text color for just a second because of the css border that I have used. This isn’t very noticeable, but it has been bugging me for ages! I want to keep the border separating the submenus, but I don’t want the flash! Is there some timer that I could use to fix this? Or could I make the border so that it is inside the box? Thank you so much for any help!

Here is the jsfiddle: http://jsfiddle.net/BLvKK/1/

note: I am aware that it would be more economical to use the css:hover property instead of triggering the rollovers through jquery, I just used jquery at this point because I was testing it out.

Here is the html:

<div id = "nav_div">
            <ul id="navigation">
                <li id="home">
                <a href="#" class="nav_style" id="home_a">Home</a>
            </li>
            <li id="sign_ups">
                <a href="#" class="nav_style" id="sign_ups_a">Sign-ups</a>
                <ul class="sub_nav_style" id="sign_ups_sub">
                    <li>
                        <a href="#">Camper Sign-up</a>
                    </li>
                    <li>
                        <a href="#">Junior Counselor Sign-up</a>
                    </li>
                    <li>
                        <a href="#">Counselor Sign-up</a>
                    </li>
                </ul>
            </li>
            <li id="info">
                <a href="#" class="nav_style" id="info_a" name="info_a">Information</a>
                <ul class="sub_nav_style" id="info_sub">
                    <li>
                        <a href="#">Facts You Need</a>
                    </li>
                    <li>
                        <a href="#">Contact Information</a>
                    </li>
                    <li>
                        <a href="#">Vendor Information</a>
                    </li>
                </ul>
            </li>
            <li id="about_camp">
                <a href="#" class="nav_style" id="about_camp_a" name="about_camp_a">About Camp</a>
                <ul class="sub_nav_style" id="about_camp_sub">
                    <li>
                        <a href="#">What People Say</a>
                    </li>
                    <li>
                        <a href="#">Sample Menu</a>
                    </li>
                    <li>
                        <a href="#">Photos</a>
                    </li>
                </ul>
            </li>
            <li id="donate">
                <a href="#" class="nav_style" id = "donate_a">Make a Donation</a>
            </li>
        </ul>

Here is the css:

ul{
margin:0 auto;
padding:0;
list-style-type:none;
}
a{
text-decoration:none;
}
#nav_div{
width:100%;
height:36px;
background:#b9bbbd;
text-align:center;
z-index:1;
}
ul#navigation{
text-align:center;
float:left;
}
ul#navigation li{
float:left;
min-width:170px;
font-size:13px;
}
ul.sub_nav_style {
position:absolute;
display:none;
padding-top: 10px;

}
ul.sub_nav_style li{
font-family:Tahoma, Geneva, sans-serif;
clear:both;
background:#b9bbbd;
border-bottom:1px solid #999999;
}
ul.sub_nav_style li a{
color:#FFFFFF; 
}
a,
a:active,
a:visited {
display:block;
padding:10px;
}
.nav_style{
font-family:Tahoma, Geneva, sans-serif;
font-size:13px;
background:#b9bbbd;
color:#FFFFFF;
}
.nav_style:hover{
font-family:Tahoma, Geneva, sans-serif;
font-size:13px;
background:#114878;
color:#000000;
}
.nav_style_roll_off{
font-family:Tahoma, Geneva, sans-serif;
font-size:13px;
background:#b9bbbd;
color:#114878;
}
.sub_nav_style_bround_roll{
background:#25313d;
}

Heres the JQuery:

// JavaScript Document
$(document).ready(function() {

    //sub rolls sign ups
    $("ul#navigation li#sign_ups ul li:eq(0) a").hover(function() {
        $(this).toggleClass("sub_nav_style_bround_roll");
        $("#sign_ups_a").toggleClass("nav_style_roll_off");
    });
    $("ul#navigation li#sign_ups ul li:eq(1) a").hover(function() {
        $(this).toggleClass("sub_nav_style_bround_roll");
        $("#sign_ups_a").toggleClass("nav_style_roll_off");
    });
    $("ul#navigation li#sign_ups ul li:eq(2) a").hover(function() {
        $(this).toggleClass("sub_nav_style_bround_roll");
        $("#sign_ups_a").toggleClass("nav_style_roll_off");
    });
    // sup rolls info
    $("ul#navigation li#info ul li:eq(0) a").hover(function() {
        $(this).toggleClass("sub_nav_style_bround_roll");
        $("#info_a").toggleClass("nav_style_roll_off");
    });
    $("ul#navigation li#info ul li:eq(1) a").hover(function() {
        $(this).toggleClass("sub_nav_style_bround_roll");
        $("#info_a").toggleClass("nav_style_roll_off");
    });
    $("ul#navigation li#info ul li:eq(2) a").hover(function() {
        $(this).toggleClass("sub_nav_style_bround_roll");
        $("#info_a").toggleClass("nav_style_roll_off");
    });
    //sub rolls about_camp
    $("ul#navigation li#about_camp ul li:eq(0) a").hover(function() {
        $(this).toggleClass("sub_nav_style_bround_roll");
        $("#about_camp_a").toggleClass("nav_style_roll_off");
    });
    $("ul#navigation li#about_camp ul li:eq(1) a").hover(function() {
        $(this).toggleClass("sub_nav_style_bround_roll");
        $("#about_camp_a").toggleClass("nav_style_roll_off");
    });
    $("ul#navigation li#about_camp ul li:eq(2) a").hover(function() {
        $(this).toggleClass("sub_nav_style_bround_roll");
        $("#about_camp_a").toggleClass("nav_style_roll_off");
    });
});
//slide toggles
$("#sign_ups").hover(function() {
    $("#sign_ups_sub").slideToggle('fast');
});
$("#info").hover(function() {
    $("#info_sub").slideToggle('fast');

});
$("#about_camp").hover(function() {
    $("#about_camp_sub").slideToggle('fast');
});

​
​
​

Thanks again!

  • 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-16T15:37:20+00:00Added an answer on June 16, 2026 at 3:37 pm

    If you only want the text to remain white, just remove .toggleClass("nav_style_roll_off"); from everywhere:

    UPDATE:
    To remove the blinking: http://jsfiddle.net/BLvKK/7/

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

Sidebar

Related Questions

I have a drop down menu that is coded in HTML, CSS, and jQuery
I have a CSS drop down menu on a website. Along the top there
I've got a little HTML/CSS/JQuery drop down menu working. My pseudo code for it
I have a working simple jquery drop-down menu . But problem is how can
I have a standard drop-down menu that uses jQuery to hide the children li
I have a drop down menu and it works perfectly on everything except IE6
i have built jQuery drop-down menu which is having problems floating over the UI
i have some index.php page.. after download jquery drop down menu,the link text like
I have got a drop down menu which works fine but i want to
I have a drop down menu which uses the slideUp feature in jQuery. I

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.