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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 11, 20262026-06-11T20:50:41+00:00 2026-06-11T20:50:41+00:00

I have been looking for a way to make a navigation menu slide down

  • 0

I have been looking for a way to make a navigation menu slide down from the top of the browser when the mouse enters the area near it and disappear when the mouse leaves the menu.

I am a lot closer thanks to this question.

The problem I am having is with the animation. It is behaving very strangely. I have emulated my code in JsFiddle to have a look at.

http://jsfiddle.net/tVreF/2/

Wait for a moment and move your mouse around the page, try resizing the window etc, and eventually it animates. Obviously this isn’t the way intended.

Any advice would be greatly appreciated, as im not sure if im going about this the right way!

EDIT: Just to clear up any confusion – I mean so that the navigation menu doesnt initially appear, then the entire menu itself slides down when the mouse goes near the top of the screen. Kind of like what happens when you set your windows taskbar to “Auto hide”.

  • 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-11T20:50:43+00:00Added an answer on June 11, 2026 at 8:50 pm

    What I have done is changed the approach.
    I made a event catcher div in this fiddle:

    http://jsfiddle.net/L2J5X/2/

    and added event handlers when a mouse comes over that div the menu animates in, when the mouse moves out the div the menu animates out.

    function dothething(amover)
        {
        if(amover) 
            {
                $(".nav").animate({top: '0px'}, 200, "linear");    
            } 
            else
            {
                window.setTimeout(function(){if(!$amthere){
                $(".nav").animate({top: '-40px'}, 200, "linear");        
                }},100);
            }
        }
            $("#detect").mouseover(function(){dothething(true);});
            $("#detect").mouseout(function(){dothething(false);});
    $("#mainNav").mouseover(function(){$amthere=true;});
    $("#mainNav").mouseout(function(){$amthere=false;});
    $amthere = false;
    ​
    

    The div is absolutely positioned with a top z-index so the event always gets caught. No matter what other divs do when they are placed randomly(see the great green block).

    Hope this helps a bit.

    * EDIT *

    Added a brief delay to prevent hiding when going from catcher div to menu. That’s what the $amthere variable is for, to see if we are on the menu or not.
    Then with a 100ms delay check if we are good to go for a real mouseout, if not do nothing, if so, hide hide menu.

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

Sidebar

Related Questions

I have been looking for a way to remove an attachment from Jira using
I have been looking for a way to make form validation as easy and
I have been looking for a way to get rid of the nasty black
I have been looking for a way to allow users to manually override geolocation
I have been looking at the Thinktecture.IdentityModel.40 library as a way of handling the
Hey i have been looking around and i cant find a way to get
I've been struggling looking for an understandable way to do this. I have four
Introduction : Hello Everyone, I have been looking for days for a way to
I have been trying for the last week to find a way to make
I have been looking for a way to allow the user to easily change

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.