You could use jQuery's animate
$("#circle").animate({
width: 0,
height: 0,
}, 1000);
You could also add an 'easing' attribute if you need to play with it. You'd have to install a jQuery easing plugin though, like this one : http://gsgd.co.uk/sandbox/jquery/easing/
By default, jQuery's easing method is swing
. linear
is also implemented in jQuery.
JSFiddle : http://jsfiddle.net/p9sDB/4/