var foo = $("div").bind("click", function() {
$("div").animate({"height" : "500px"}, 2000);
$("div").animate({"height" : "50px"}, 2000);
$("div").unbind();
});
http://jsfiddle.net/3NRsd/ var foo = $(div).bind(click, function() { $(div).animate({height : 500px}, 2000); $(div).animate({height : 50px},
Share
You could do:
DEMO