Simple animation help

Simple animation help

Hi, I am a newbie trying to learn how to chain animations -- that is, run a sequence of animations upon a click event, one after the completion of the other.

Trying this obviously runs the animations concurrently:
$("a").click(function() {
      $(".box1").hide('slow');
      $(".box2").hide('slow');
   });


Searching for an answer, I tried using a callback, but in this scenario, only box1 is affected.

$("a").click(function() {
      $(".box1").hide('slow');
   }, function() {
      $(".box2").hide('slow');
   });


I'm a true newbie in every sense of jquery, so I don't know if this is the right idea at all -- or if it is, how to implement it. It's probably a very simple fix, but if somebody could help me it would be greatly appreciated!

Thanks