On Sat, 2009-03-21 at 13:33 -0400, John Resig wrote:
> And how is the natural height determined if you've already explicitly
> overwritten it with another value?
It would be the 'auto' height. I've run into exactly the same
problem recently: I have a list that I would like to show only
partially
The problem there is that the height there becomes the end height.
"show" unsets the value after animation. A little more like.
var height = $(this).height();
$(this).hide().css({height: 5})
.animate({width: "show"})
.animate({height: height}, {complete: function() {$(this).css("height",
""
We swap the value out to get the value, but don't unset the value - and
that's only for height and width.
What you're talking about can be done like this:
var height = $(this).height();
$(this).hide().css({height: 5})
.animate({width: "show"})
.animate({height: height});
That looks pretty s
I believe jQuery does it using swap and unsetting the value, right?
~Daniel Friesen (Dantman, Nadir-Seen-Fire) [http://nadir-seen-fire.com]
-Nadir-Point & Wiki-Tools (http://nadir-point.com) (http://wiki-tools.com)
-MonkeyScript (http://monkeyscript.org)
-Animepedia (http://anime.wikia.com)
-Naru
And how is the natural height determined if you've already explicitly
overwritten it with another value?
--John
On Fri, Mar 20, 2009 at 9:11 PM, Daniel Friesen
wrote:
>
> At work I tried to animate something to grow horizontally then grow
> vertically.
>
> .hide().css({height: 5}) // Use a smal