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

  • Home
  • SEARCH
  • 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 9227127
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 18, 20262026-06-18T04:59:35+00:00 2026-06-18T04:59:35+00:00

Basically I created a dropdown menu with jquery by using the slideUp and slideDown

  • 0

Basically I created a dropdown menu with jquery by using the slideUp and slideDown functions. Everything worked good until I figured that if I continue hovering the mouse through the list, the height of the sub button won’t stop. And we can see that by the border-left expanding. Any way to avoid this?

I’ve created a fiddle so that you guys can know what I’m talking about http://jsfiddle.net/WGm8q/

Anyway here’s the code:

JS

$('.button').hover(
    function () {
        $('.sub', this).stop().slideDown(100);
    }, 
    function () {
        $('.sub', this).stop().slideUp(100);
    }
);

CSS

.menu {
    width: 850px;
}
.button .main {
    padding-bottom: 5px;
    cursor: pointer;
}
.button .sub {
    display: none;
    margin-left: 10px;
    padding: 10px 0 10px 0;
    border-left: 1px solid #CCC;
}
.button .sub p {
    background-color: #FFF;
    margin: 0;
    padding-left: 5px;
}

HTML

<div class="menu">
    <div class="button">
        <div class="main">Menu 1</div>
        <div class="sub">                    
            <p>Submenu 1</p>                 
            <p>Submenu 1</p>                 
            <p>Submenu 1</p>                 
            <p>Submenu 1</p>                 
            <p>Submenu 1</p>                 
            <p>Submenu 1</p>                 
            <p>Submenu 1</p>
        </div>
    </div>
</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-06-18T04:59:36+00:00Added an answer on June 18, 2026 at 4:59 am

    Your Fiddle

    Change this:

    .button .sub {
    display: none;
    margin-left: 10px;
    padding: 10px 0 10px 0;
    border-left: 1px solid #CCC;
    }
    

    Into:

    .button .sub {
    display: none;
    margin-left: 10px;
    border-left: 1px solid #CCC;
    }
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I've basically created a drop down menu using <ul> and <li> with <li> items
Basically, I am using Wireshark looking at captures that have been created previously. How
I am using a plugin to create a real slick jquery select (dropdown) menu.
I created a native Android app that basically hosts a webView control. That webView
Basically, I have created a custom control that uses an UpdatePanel, and as I
Basically, I have a model where I've created a superclass that many other classes
I'm basically trying to play with recursions and created a small program that finds
I have created following thing in android using android compatibility support package Basically i
So, basically I have this select / drop down menu that I use AJAX
I have created a drop-down-menu, the html for the drop-down part basically 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.