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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 28, 20262026-05-28T16:49:27+00:00 2026-05-28T16:49:27+00:00

This is bizarre. I have a div. It is set with display: none .

  • 0

This is bizarre. I have a div. It is set with display: none.

If I use $('#id').show(); then $(document).height() is updated with the height of #id.

However, if I use $('#id').slideDown(); then $(document).height() remains unchanged.

If you would like to test it, try the following:

console.log("before",$(document).height());
$('#id').show(); //slideDown();
console.log("after",$(document).height());

Could a jQuery Master (jQM) explain this, please? 🙂 [BTW, I am using Firefox 9.0.1.]

  • 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-28T16:49:27+00:00Added an answer on May 28, 2026 at 4:49 pm

    You will have to wait for the completion of the slideDown() animation before measuring the height. The function call to slideDown() finishes immediately (at which point I assume you measure the document height), but the animation has only just begun so the item has barely, if at all, even changed height yet. All the slideDown method does is start the animation (which then runs to completion on timers over time). So, what you’re probably doing is measuring the height right after the animation is started, long before it’s done.

    If you want to measure the document height after the slideDown() animation finishes, then you need to do so from a completion callback function (which signals when the animation is finally done) like this:

    console.log("before",$(document).height());
    $('#id').slideDown(function() {
        console.log("after",$(document).height());
    });
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I have this bizarre problem. I'm making a checklist program with XCode and I'm
I know this sounds bizarre, but it is true. I have a simply WPF
I'm having one of those bizarre this used to work and then it stopped
Possible Duplicate: Testing use of NSURLConnection with HTTP response error statuses This is bizarre;
This is bizarre, but I am hoping someone can help me out. I have
I have a rather bizarre situation, and it's not the first time I this
This is bizarre. Developing for the iPhone I have an NSString: distanceFromTargetString = @6178266.000000
This problem is bizarre. I have never encountered anything like it before. I am
I am having this bizarre error and I don't know what to do. This
Ok, this is downright bizarre. I am building a web application that relies on

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.