title: how to execute a array in jQuery
body: <p>i am new with jQuery and i want to make an array to be executed.So i make an array of same class of divs.those are like that </p>
  
  <pre><code>&lt;div class="block"&gt;&lt;img src="/home/ranjit/Desktop/Test/sunrise1.jpg" alt="sunset" /&gt;&lt;/div&gt;
  &lt;div class="block"&gt;&lt;img src="/home/ranjit/Desktop/Test/sunset-sailing.jpg" alt="sunset1" /&gt;&lt;/div&gt;
  </code></pre>
  
  <p>look that each of div having different data in an array and i make the array like this </p>
  
  <pre><code>var matches = [];
  jQuery(".block").each(function() {
      matches.push(this);
  });
  </code></pre>
  
  <p>now i want to run the function </p>
  
  <pre><code>function slider() {
      for (var i= 0; i &lt; len; i++){
        console.log(matches[i]);
        jQuery(matches[i]).show("slow");
        jQuery(matches[i]).animate({left:'+=730'}, 3000, function(){
          jQuery(this).animate({left:'-=730'},3000);
        });
      }
    }
  </code></pre>
  
  <p>when i call the the slider function it executed the last of the div only. why i dont know, but i think it should logically executed the first div then the second div. plz help me why is this not executed like that .</p>