Question: I want to animate a div from top down. I think the idea is animate the height from 0 to its rendered width.
But before it is shown I don't know the rendered width, how to write the code to animate this?

It's like: `$.animate({"width":"auto"})`

Answer: 
You need to grab the width using `.width()` like so:

```
var $el = $("#elementID");
$el.animate({height: $el.width()});

```
using .width() will not return the full computed width including the border/padding etc... for this purpose i would use .outerWidth() and pass the optional true to include the margins.

```
$('element').animate({height: $('element').outerWidth(true)});

```