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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 30, 20262026-05-30T18:37:31+00:00 2026-05-30T18:37:31+00:00

I have a footer area that is display:none by default. This bottom footer area

  • 0

I have a footer area that is display:none by default. This bottom footer area holds things like the menu and social links.

In order to see this menu, you scroll down to the BOTTOM of the page (all the way, so you cant scroll any farther). there you see and click a button that says ‘expand’. once you do that, the div beneath the expand button which holds the content animates with slideDown().

the problem is the page doesnt scroll along with bottom edge of the div as it animates downwards… so at first glance it looks like nothing happens until you realize you have to scroll down a little bit more. i want it to automatically scroll the page at the exact same speed/length that it animates.

heres the click function

$('#footer-click a').click(function() {
    if ($('#footer-inner').css('display') === 'none') {
        $('#footer-click a').html('Hide');
        $('#footer-inner').slideDown('medium');
} else {
        $('#footer-click a').html('Expand');
        $('#footer-inner').slideUp('medium');
    }
return false;
});
  • 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-30T18:37:32+00:00Added an answer on May 30, 2026 at 6:37 pm

    You should be able to use scrollTop() to scroll the extra distance:

    $('#footer-click a').click(function() {
        if ($('#footer-inner').css('display') === 'none') {
            $('#footer-click a').html('Hide');
            $('#footer-inner').slideDown('medium', function() {
                $('html').scrollTop( $('html').scrollTop() + $('#footer-inner').outerHeight() );
            });
        } else {
            $('#footer-click a').html('Expand');
            $('#footer-inner').slideUp('medium');
        }
        return false;
    });
    

    Of course, this will make it happen all at once at the end. You might have to customize the animation to make it smooth. (Let me think about it…)

    Edit: OK what you might want to do is simply show() the footer, and then use animate to scroll the page down. It gives the same effect. You can close it the same way as before:

    $(function() {
        $('#footer-click a').click(function() {
            if ($('#footer-inner').css('display') === 'none') {
                $('#footer-click a').html('Hide');
                $('#footer-inner').show();
                // Some browsers use html, some use body.  Use the bigger one:
                var scrollY = $('body').scrollTop()?$('body').scrollTop():$('html').scrollTop();
                $('html, body').animate({
                    scrollTop: scrollY + $('#footer-inner').outerHeight()
                }, 'medium');
            } else {
                $('#footer-click a').html('Expand');
                $('#footer-inner').slideUp('medium');
            }
            return false;
        });
    });
    

    Example: http://jsfiddle.net/Eeq26/4/

    If there is a posibility the footer won’t be at the very bottom, you would need an if..then to check if scrollTop() == 0, and use slideDown() in that case.

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

Sidebar

Related Questions

I have a footer that is fixed to the bottom of the viewport. I
I have a Telerik Grid which has a footer that needs to display column
I have index page with navigation menu like this man caps shirt jeans woman
I have site that I want to look like this: but instead it looks
I have a main content area div that has a border. Inside this area
In the app I'm building, I'd like to have a nice footer with data
i have 3 rows div layout with footer on bottom of page, but i
I have a page with a header, footer, and middle area. The middle is
I have an accessibility skip nav menu that uses named anchors to jump to
I have a setup that requires a header div and a footer div to

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.