FadeIn and FadeOut (ROW TABLE)

FadeIn and FadeOut (ROW TABLE)

Hello!

I have two tables, one father y the son. When I select a father`s line I want it to show me all its children. right now what i'm doing is through TR display' way, hide and show. I would like to do it with the FaceOut and the FaceIn of the Jquery. The problem is that only the FaceIn and FaceOut of the last line works. Am I doing something wrong?


function ShowHideTableRow(rowSelector, show, callback)
{
      var childCellsSelector = $(rowSelector).children("td");
      var ubound = childCellsSelector.length - 1;
      var lastCallback = null;

      childCellsSelector.each(function(i)
      {
            if (ubound == i)
                  lastCallback = callback

            if (show)
            {
                  $(this).fadeIn("slow", lastCallback);
             }
            else
            {
                  $(this).fadeOut("slow", lastCallback);         
            }
      });
}