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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 30, 20262026-05-30T14:09:14+00:00 2026-05-30T14:09:14+00:00

I have a div called #footer , whose margin is animated using jQuery to

  • 0

I have a div called #footer, whose margin is animated using jQuery to slide it up when a user hovers over it. Inside #footer is a div called #toggle, which animates the footer back down again when clicked.

It all works fine except that when #toggle is clicked and #footer has animated back down, if I move the mouse it triggers the hover again, even though the mouse isn’t over #footer anymore. It’s driving me crazy!

Here’s the jQuery:

$('#footer').hover(function(){
    $(this).stop(true, true).animate({"margin-bottom": "0px"}, "slow");
    $('#toggle').addClass('expanded'); 
});

$('#toggle').click(function(){ 
    $('#footer').stop(true, true).animate({"margin-bottom": "-120px"}, "slow");
    $(this).removeClass('expanded');
});

What I need I think is to unbind the hover event when it’s done, and rebind it when #toggle is clicked. Maybe? But I can’t figure out how to make it work.

  • 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-30T14:09:15+00:00Added an answer on May 30, 2026 at 2:09 pm

    You should probably use the mouseenter event instead of hover.

    Using hover with a single argument will trigger the function on both mouseenter and mouseleave.

    hover( handlerInOut(eventObject) )

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

Sidebar

Related Questions

I have a div called 'divLinks' I want all links inside the divLinks to
I have a div called divContainer inside which i have few input elements like
I have made a div called navarea and inside it I have 6 more
I have created a div using jquery and put some text in it: var
I have a div box (called flux) with a variable amount of content inside.
I have a div called target which is centred and displayed over a google
I have a div called test and mvc action in the client controller The
I've got 3 tabs. Each of them have a div called optional , apart
I have a div with overflow:hidden , inside which I show a phone number
I have a div with two nested divs inside, the (float:left) one is the

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.