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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 15, 20262026-05-15T13:06:53+00:00 2026-05-15T13:06:53+00:00

This is a code for a drop down menu. It is designed to drop-down

  • 0

This is a code for a drop down menu. It is designed to drop-down (umdown) when the cursor moves over button. But when the cursor moves away from Multiple the umdown goes away.

HTML markup:

<div id="button"><span id="text">Down</span></div>

<div id="umdown">
    <div id="multi">Multiple</div>
    <div id="sd">Single</div>
</div>

CSS code:

#button{
    position:relative; top:1px; background-color:#060; width:200px; height:30px; background-image:url(../images/btn_bg.jpg); cursor:pointer;
}

#text{ position:absolute; margin-top:5px; text-align:center; width:200px; height:30px; font-stretch:expanded; font-family:"Trebuchet MS", Arial, Helvetica, sans-serif; color:#000; font-weight:bold; font-size:17px;}

#multi{
    width:160px; margin-left:5px;
}

#sd{
        width:160px; margin-left:5px;
}


#umdown{
    position:relative; left:30px; height:50px; background-color:#900; width:170px; cursor:pointer; font-family:"Trebuchet MS", Arial, Helvetica, sans-serif; color:#000; font-size:14px;
}

Javascript code:

$('#button').bind('mouseover',function(){
    $('#umdown').fadeIn();});
    $('#umdown').bind('mouseover',function(){
                $('#umdown').show();     });

    $('#umdown').bind('mouseout',function(){                                                                $('#umdown').fadeOut();
    });

Let me know what I have done wrong.

Thanks
Jean

  • 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-15T13:06:54+00:00Added an answer on May 15, 2026 at 1:06 pm

    Instead of mouseout here, you want mouseleave, so replace this:

    $('#umdown').bind('mouseout',function(){
      $('#umdown').fadeOut();
    });
    

    With this:

    $('#umdown').bind('mouseleave',function(){
      $(this).fadeOut();
    });
    

    The main difference is in the mouseleave docs:

    The mouseleave event differs from mouseout in the way it handles event bubbling. If mouseout were used in this example, then when the mouse pointer moved out of the Inner element, the handler would be triggered. This is usually undesirable behavior. The mouseleave event, on the other hand, only triggers its handler when the mouse leaves the element it is bound to, not a descendant. So in this example, the handler is triggered when the mouse leaves the Outer element, but not the Inner element.

    I would suggest using .stop() in this case as well to handle fade/hover issues, so your overall code looks like this:

    $('#button').bind('mouseover',function(){
      $('#umdown').stop(true, true).fadeIn();
    });
    $('#umdown').bind('mouseleave',function(){
      $(this).stop(true, true).fadeOut();
    });​
    

    You can see a working demo here

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

Sidebar

Ask A Question

Stats

  • Questions 510k
  • Answers 510k
  • Best Answers 0
  • User 1
  • Popular
  • Answers
  • Editorial Team

    How to approach applying for a job at a company ...

    • 7 Answers
  • Editorial Team

    What is a programmer’s life like?

    • 5 Answers
  • Editorial Team

    How to handle personal stress caused by utterly incompetent and ...

    • 5 Answers
  • Editorial Team
    Editorial Team added an answer No, this is not possible. Each statement is executed and… May 16, 2026 at 4:59 pm
  • Editorial Team
    Editorial Team added an answer Would recommend that you look at WCF If you have… May 16, 2026 at 4:59 pm
  • Editorial Team
    Editorial Team added an answer http://www.r6rs.org/final/html/r6rs-lib/r6rs-lib-Z-H-3.html#node_sec_2.8 -- Procedure: bytevector-ieee-double-native-set! BYTEVECTOR K X -- Procedure: bytevector-ieee-double-set!… May 16, 2026 at 4:59 pm

Trending Tags

analytics british company computer developers django employee employer english facebook french google interview javascript language life php programmer programs salary

Top Members

Related Questions

this is my code which populates a drop down menu, all working perfectly, but
I`m using this code to repopulate drop down list from the database : $city_id
I have menu designed using jQuery in oracle apex.The menu is like this Parent1
I'm working on a jQuery drop-down menu that fades in when you hover on
I would like to have a drop down menu with jQuery show and hide
Is there a better, more efficient way to write this code? It's a make
I have a drop down list that is populated in the page load event
My site structure looks like this: - top-level site --sub-site ---page ---page --sub-site ---page
I am using the following code for the Share Price Application I have been
I have some entities created with LINQ-to-SQL. Six of these entities (representing values primarily

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.