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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 20, 20262026-05-20T13:57:11+00:00 2026-05-20T13:57:11+00:00

There is a <ul> list that I’m retrieving via XHR and inserting into another

  • 0

There is a <ul> list that I’m retrieving via XHR and inserting into another node (<div>). This list has a different number of elements every time (so the height of the resulting node varies).

I’d like to animate the <div> into which I’m inserting that list as it takes the new height. So, say the div was initially 100px, and the height of the XHR-retrieved list is going to be 150px, the <div> should smoothly expand to the new height of 150px.

To do this, I need the height of the rendered list (taking all the page styles into account) before it is actually rendered. Question: (a) how would you find the height, (b) do you see another way of doing this animation, and (c) is this at all possible?

  • 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-20T13:57:12+00:00Added an answer on May 20, 2026 at 1:57 pm

    a) as far as i know it isn’t possible to accurately determin the height of a not yet rendered element
    b) With jQuery’s >slideUp> and slideDown this is perfectly doable, are you using a framework?
    c) yes, you might have to put a wrapper div around the depending on the way you do it.

    More:
    By putting a wrapper <div> around your <ul> and setting th <div> to height:0 and overflow:hidden you can perfectly render the <ul> in it without showing it. Then you have plenty of time for javascript to get the dimensions of the <ul> and animate/resize the wrapping <div> to the <ul>’s height without ever showing your <ul>.

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

Sidebar

Related Questions

Is there a list of 3D cards available that provide full scene antialiasing as
Is there any way to list all the files that have changed between two
Is there a built in dll that will give me a list of links
Is there a way to get a list of all the GMarkers that have
Is there a good Django app out there that can take a list of
Is there a way to collect (e.g. in a List) multiple 'generic' objects that
Suppose there is a list that is input from the console using <STDIN> @string
I have a list that looks like this: <span id=contacts_tab_contacts_list_list> <li><span id=contact_35>John</span> </li> <li><span
I'm thinking of creating a 'People who viewed this also viewed' list that you
Is there any list of blog engines, written in Django?

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.