jquery scrollTop

jquery scrollTop

Does anybody tell me why this code doesn't work?

frames[i] is the frame where the element is (a span element).  I don't understand what's wrong:

$(frames[i]).animate({scrollTop: $(el).offset().top},'slow');

regards