Is it possible to define a string of animations as a variable?
For example (this is what I think, but doesn't work?):
var speed = 500;
var dothis = $("#div").slideUp('speed');
$("#div").slideDown('speed');
$("#div").animate({height: "0px"}, 'speed');
$("button").click(function () {
$(this).dothis();
});
I'm not totally sure how to set it up.