FadeTo mehod issue

FadeTo mehod issue

I am stuck on a problem and thought I would ask here...

I am using the fadeTo method as such
  1. tr = $("table tr.selected")
  2. // fade all selected rows
  3. tr.fadeTo("slow", 0, function(){
  4.       $(elem).hide();

  5. });
  6. doSomethingElse();  // gets executed before the callback function above runs (not what I want)
I am running into an issue because I want to execute a method after all the animations have completed, but the callback executes with each iteration over my tr set.  I found this in the documentation
If multiple elements are animated, it is important to note that the 
callback is executed once per matched element, not once for the
animation as a whole.



Does anyone know of a way to have a call back function that executes only after the whole animation has been completed?

Thank you