objects = $(".toChange"); objects.each(function (index) { object = objects[index]; object.animate({opacity: 0}, 500); });
object = objects.eq(index)
objects = $(".toChange"); objects.each(function (index) { this.animate({opacity: 0}, 500); // или $(this).animate({opacity: 0}, 500); });
<script src="http://code.jquery.com/jquery-1.6.4.min.js"></script> <style> div {width:64px; height:64px; background: red; display:inline-block} </style> <div>1</div> <div>2</div> <div>3</div> <script> objects = $("div"); objects.each(function (index) { $(this).animate({opacity: 0}, 5000); }); </script>
objects.set(); $.makeArray()