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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 26, 20262026-05-26T21:35:51+00:00 2026-05-26T21:35:51+00:00

This is the situation, I have 2 div’s next to each other. One div

  • 0

This is the situation, I have 2 div’s next to each other. One div is very dynamic in height, which basically means it can grow and shrink to accommodate for it’s content. For example, this div has content that can be folded open or close, or containers that can expand to fit ajax loaded content.

Now, next to this div is another one that neatly follows the height of the first one through css. Works great. But here is the question: I would like to change the content of this second div depending on its height.

In other words, div 1 changes in size, div 2 follows through css and I now need to trigger an ajax call to re-fill div 2 with new content, befitting it’s new size.

Has anybody an idea how I can do this with jquery? If possible, without the use of timeouts?

Cheers.

  • 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-26T21:35:52+00:00Added an answer on May 26, 2026 at 9:35 pm

    As the thread poelinca provided suggests, there are some nice plugins available for this functionality.

    If you don’t like the plugin idea, another simple solution would be to simply trigger a “resize” event on the div whenever the content is modified. Then you could monitor it with resize() as expected, utilizing an elegant observer pattern.

    function appendContent($div, content) {
       $div.append(content).trigger($.Event('resize'));
    }
    
    $div.bind('resize', function(e) {
       // all your magic resize mojo goes here
    });
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I have a div which has some text, but according to different situations this
http://jsfiddle.net/AndyMP/nUhhf/1/ This is a simplified situation where I have a DIV that animates downwards
Afternoon. Im struggling with this situation. I have a very simple tabbed content inside
I have this situation: I made 2 div's, both should be at the exact
I have this situation: <div A> <div B> <div C> Div A is a
i have this situation: <div class=cont_picture> <?php echo <a id=\mine_click\ href=\#\ >a test</a>; ?>
i have this situation: if(isset($_POST[sm]) { print <br><div id=\redirect\>success</div>; } in javascript i have:
i have this situation <div class=sub_project> <div class=sbone brown_gradient optzeci>Description</div> <div class=sbtwo optzecitwo> Lorem
i have this situation: <ul class=accept_friends> <li> <div class=center_image>test1</div> <div> <a href= id=addfriend class=gbutton
I have a situation where I have one div of fixed width, containing an

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.