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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 6, 20262026-06-06T18:38:03+00:00 2026-06-06T18:38:03+00:00

I am trying to make the smallest menu with submenus possible. So far, here

  • 0

I am trying to make the smallest menu with submenus possible. So far, here is my code:

<div id="ctl100_cphHeader_NavigationBar">
    <li></li> <!-- makes first left-border in css -->
    <li><a class="navlink" href="/ComingSoon.aspx">N/A</a></li>
    <li><a class="navlink" href="/ComingSoon.aspx">N/A</a></li>
    <li>
        <a class="navlink" href="/ComingSoon.aspx">N/A</a>
        <div class="submenu">
            <a class="navlink" href="/">Home</a>
            <a class="navlink" href="/">Home</a>
        </div>
    </li>
    <li>
        <a class="navlink" href="/ComingSoon.aspx">N/A</a>
        <div class="submenu">
            <a class="navlink" href="/ComingSoon.aspx">Coming Soon</a>
        </div>
    </li>
</div>

I am wanting to use jquery to make it so on $(‘.navlink’).mouseenter() any submenus under it will appear, and on $(‘.navlink’).mouseleave() any submenus under it will disappear.
How would I go about this? I am new to jquery and not good with selectors.

  • 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-06T18:38:05+00:00Added an answer on June 6, 2026 at 6:38 pm

    Try the following script:

    $(document).ready(function () { 
        var speed = 500;//The speed is in milliseconds 
        $('li').hover(function () {
             //show its submenu
             $(this).children('.submenu').stop().slideDown(speed);
            },
            function () {
             //hide its submenu
             $(this).children('.submenu').stop().hide(speed);      
         });
    });​
    

    I just used the hover function, the first function(){... is the onMouseEnter and the second function(){... is the onMouseLeave. Also remember that the submenu’s need to bedisplay:none.

    You can do this with javascript by adding the following code to the top of the previous one:

    $('.submenu').hide();
    

    I recommend using the CSS to hide them though:

    .submenu{
      display:none
    }
    

    You don’t need to add that extra function in the JavaScript.

    Check out the JSfiddle so see this code in action!

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

Sidebar

Related Questions

Trying to make a simple jquery drop down here, here's my code so far:
I'm trying make my first python app. I want make simple email sender form.
For curiosity's sake, I'm trying to see what's the smallest that I can make
Trying to make td elements clickable. Here's my HTML: <td id=A3 class= open-square><a href=/gameplay/A3></a></td>
Trying to make this function dynamic instead of static. This was the original code
Im trying make a menu with the next structure: -category 1 --category 1.1 ---category
I'm trying make this code which is from a Dictionary of Arrays (CODE) from
I'm trying make Ethos framework on Mac OS Lion. git://git.dronelabs.com/ethos Here result of ./configure:
I am trying make a request and get response from server. Here is my
I'm trying make a login window where a user is prompted to enter their

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.