Ajax Div Maintain Height

Posted by pws5068 on Stack Overflow See other posts from Stack Overflow or by pws5068
Published on 2010-04-13T16:48:13Z Indexed on 2010/04/13 16:52 UTC
Read the original article Hit count: 485

Filed under:
|
|
|

Greetings,

I have a list of user comments on a page, with a next button which makes an Ajax call to get the second set of comments.

The problem is, the height of the comments div temporarily becomes very small while the loading bar is in place. This makes the user need to scroll back down to see the new comments

The issue can be seen at the bottom of this page by clicking "Next" comments.

Is there a way to force the div to maintain its height through Javascript? I do not want to hard code the div height in case a page has 3 or less comments.

© Stack Overflow or respective owner

Related posts about AJAX

Related posts about JavaScript