Your approach worked great! Thanks a lot for the help.

On Jul 21, 2:00 am, Liam Potter <radioactiv...@gmail.com> wrote:
> take off the height in the CSS, store the computed height in a var, and
> on page load set the div to the 300px, then animate to the height
> contained in the var.
>
> ebakunin wrote:
> > Hello,
>
> > I have a <div> with a height of 300px, overflow hidden, and a lot of
> > text -- more than can be displayed in the <div>. I would like
> > to .animate() the <div> to display the entire text. Without animation
> > I could just use .css("height", "auto"). When I use the same code in
> > animation -- .animate({"height":"auto"}) -- it returns the height of
> > the <div> before animation, i.e. 300px. Instead, I need to set a
> > variable before animation that captures the value of "height":"auto"
> > without actually applying .css(). That way I use the variable in
> > the .animate() call. Can anyone recommend a way to do this? Thanks a
> > lot for the help.

Reply via email to