SyntaxFix
Write A Post
Hire A Developer
Questions
You can make Liquinaut's answer responsive to window size changes by adding a callback that sets the height back to auto.
$("#first").animate({height: $("#first").get(0).scrollHeight}, 1000, function() {$("#first").css({height: "auto"});});