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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 17, 20262026-05-17T16:14:51+00:00 2026-05-17T16:14:51+00:00

In my menu below, I have this in my CSS: ul li ul {display:none;}

  • 0

In my menu below, I have this in my CSS:

ul li ul {display:none;}

When a menu item is selected, I use this jQuery to show the children menu:

$('ul li.selected ul').show();

So I confused on how to handle hovers for the top level menu. When I hover over a top level menu item, how do I hide all sub-menus and show only the hovered items. But when hovering off it, I need it to show the li.select again as it originally was. How do I do this?

<div class="menu">
<ul>
    <li class="administration first selected">
        <a href="/administration.aspx"><span>Administration</span></a>
        <ul>
            <li class="users first"><a href="/administration/users.aspx"><span>Users</span></a></li>
            <li class="forms last"><a href="/administration/forms.aspx"><span>Forms</span></a></li>
        </ul>
        <div style="clear: both;"></div>
    </li>
    <li class="analytics"><a href="/analytics.aspx"><span>Analytics</span></a></li>
    <li class="options"><a href="/options.aspx"><span>Options</span></a></li>
    <li class="system last"><a href="/system.aspx"><span>System</span></a></li>
</ul>
</div>
  • 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-17T16:14:52+00:00Added an answer on May 17, 2026 at 4:14 pm

    It should just be $('ul li.selected:hover ul').show();. If not then please explain in greater detail exactly what you want.

    Another way is to use:

    $('ul li.selected').hover(
        function() {
            $(this).find("ul").show();
        },
        function() {
            $(this).find("ul").hide();
        }
    );
    

    See http://bavotasan.com/tutorials/creating-a-jquery-mouseover-fade-effect/ for a good example. If the code above doesnt work then use the page above – it has a good, working example of using .hover().

    There are also all sorts of really cool effects you can get for show and hide – such as fade, blind and many more. Look up jQuery UI.

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

Sidebar

Related Questions

I have jQuery menu I've been working on based on Stu Nicholls CSS multi-level
The menu structure I have is given below. The necessary requirements are: Each li
I have the following snippet of code (see below) and want to make the
I have the following code to layout the menu for my page: //Header Conainer
I need to make a css navigation according to the following style: DESIRED LOOK
Update: I left the following javascript code in to show how the problem developed
Hey. Having a rather puzzling issue with my dropdown menus and iframes. I have
I have issue with IE 8 padding setting. If you look at my web
Im having some issues trying to adjust the Width of some of the items

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.