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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 24, 20262026-05-24T17:17:53+00:00 2026-05-24T17:17:53+00:00

I am trying to create a hover menu effect using JQuery. The perfect example

  • 0

I am trying to create a hover menu effect using JQuery. The perfect example of what I am looking for can be found at http://www.godaddy.com/ (check out the green bar)

All the example I have seen are using UL and LI with nested elements. However, I am looking to achieve this with elements that are not nested. If you check the source for godaddy then you can see these elements are non-nested just like I want.

Imagine I have some mark-up as follows…

<div>
   <a id="button1"><img .../></a>
   <a id="button2"><img .../></a>
   <a id="button3"><img .../></a>
</div>
<div id="menu1">
   //anything I want in here (links, labels etc.)
</div>

I would like to be able to create a javascript function that can be called to setup these menus as follows…

SetupMenu("#button1", "#menu1");

this function will position the div element (which is absolute) and this I can do without issue. The bit I cannot work out is for the hover events. I have a simple example of these events…

$(button).mouseenter(function (e) {
   $(menu).show();
});
$(button).mouseleave(function (e) {
   $(menu).hide();
});

Obviously this works great for showing the menu, but when you want to mouse over the menu, then the mouse leave is fired for the button (as I would expect). I know this is the wrong approach but am just showing where I am at the moment.

Thanks for any help

Related CSS is as follows (modified names for example purposes)…

#menu1
{
    position:absolute;
    display:none;
    min-width:100px;
    padding:10px 10px 20px 10px;
}

#button1
{
    height:16px;
    width:16px;
    display:inline-block;
    padding:4px;
    cursor:pointer;
}
  • 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-24T17:17:54+00:00Added an answer on May 24, 2026 at 5:17 pm
    var intVal = 0;
    $(button).mouseenter(function (e) {
       $(menu).show();
    });
    $(button).mouseleave(function (e) {
      intVal=  setTimeout(function() { $(menu).hide(); }, 1000);
    });
    
    $(menu).mouseenter(function() {
       clearTimeout(intVal);
    });
    $(menu).mouseleave(function(e) {
       $(this).hide();
    }
    

    This can help you, your menu wont be hidden until 1 second, but if mouse is over your opened menu it will clear timeout and menu will be opened till mouseleave.

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

Sidebar

Related Questions

I'm trying to create a simple menu pop-up effect using anchors within a div
I am trying to create a dropdown menu based on Stu Nicholls' : http://www.cssplay.co.uk/menus/pro_drop8.html
I'm trying to create a fade in effect using jQuery, html & CSS with
So I am trying to create a drop down menu using .hover() and .toggle().
OK, so. I'm trying to create a dropdown menu of sorts using fadeToggle(). http://westrock.juggernautwebsites.com/
I'm trying to follow the nifty tutorial at http://www.kriesi.at/archives/create-a-multilevel-dropdown-menu-with-css-and-improve-it-via-jquery and well, it hit me
I'm trying create a bot which automatically likes Facebook posts. Using Mechanize I can
I am trying to create to a vertical navigation menu using CSS sprites. I
I am trying to create a simple menu using li elements, but it only
I am trying to create a jQuery hover function that will highlight a different

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.