objects = $(".toChange"); objects.each(function (index) { object = objects[index]; object.animate({opacity: 0}, 500); });