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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 28, 20262026-05-28T06:50:26+00:00 2026-05-28T06:50:26+00:00

In a nutshell I want a callback to fire after the html has been

  • 0

In a nutshell I want a callback to fire after the html has been injected and the content of that html has rendered. Reason being I need to know the height of the new content right away. Something like this:

  $('div').html(tonsofstuff);
  console.log( $('div').height() ); //works in Firefox, but returns 0 in Chrome
  setTimeout(function(){
        console.log( $('div').height() ); //works everywhere, but takes too long
  },3000);

The issue is occasionally in some browsers (and always in chrome) $(‘div’).height() fires before the new content has a height.

My fantasy:

  $('div').html(tonsofstuff, function(){
        console.log( $('div').height() );
  });

  or even

  $('div').html(tonsofstuff).load(function(){
        console.log( $('div').height() );
  });
  • 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-28T06:50:26+00:00Added an answer on May 28, 2026 at 6:50 am

    This is what I do:

    var height = $('div').html(tonsofstuff).height();
    

    I never had any problems with waiting for it to render.

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

Sidebar

Related Questions

In a nutshell: I have some database table data that I want to populate
In a nutshell: I want to do the same thing Dependency Walker does. Is
In a nutshell, there's a global stylesheet: a { font-family: Arial; } I want
In a nutshell, I have a solution that builds fine in the IDE, and
Here are the specs that I'm trying to implement in a nutshell: 1) Some
Here's what I've been trying to do, in a nutshell: class example <T extends
In a nutshell , I want to have different faces for some types of
I want to add a custom table to my iPhone app, that should look
I'm making a task-based program that needs to have plugins. Tasks need to have
In a nutshell: Using jquery I want to get some xml output and use

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.