title: How to animate in while loop
body: <p>I am trying to animate each DIV one by one using a while loop. but 
  there are i am  facing a issue. while loop variable generate the number of series as i can get that in alert box.but when i use the while loop increment variable in .eq() function it not working as increment animate Div one by one.</p>
  
  <p>..Jitu</p>
  
  <p><div class="snippet" data-lang="js" data-hide="false">
  <div class="snippet-code">
  <pre class="snippet-code-js lang-js prettyprint-override"><code>$(document).ready(function(){
   function BoxAnimate(){
   var count= 1;
    while( count &lt; 9){
     //alert(count);
     $(".animation").eq(count).animate({
     left:"500px"
     });
     count++;
    }
   }
  
   BoxAnimate();
  });</code></pre>
  <pre class="snippet-code-css lang-css prettyprint-override"><code>.animation { background:red; 
    margin-bottom:10px;
    margin-left:30px;
    height:150px; 
    width:150px;
    font-family:Arial;
    font-size:30px;
    text-align:center;
    color:#fff;
    line-height:150px;
    position:relative;
    clear:both;
   }</code></pre>
  <pre class="snippet-code-html lang-html prettyprint-override"><code>&lt;script src="https://ajax.googleapis.com/ajax/libs/jquery/2.1.1/jquery.min.js"&gt;&lt;/script&gt;
  &lt;div id="ani-wrp"&gt;
       &lt;div class="animation"&gt; 1 &lt;/div&gt;
    &lt;div class="animation"&gt; 2 &lt;/div&gt;
    &lt;div class="animation"&gt; 3 &lt;/div&gt;
    &lt;div class="animation"&gt; 4 &lt;/div&gt;
    &lt;div class="animation"&gt; 5 &lt;/div&gt;
    &lt;div class="animation"&gt; 6 &lt;/div&gt;
    &lt;div class="animation"&gt; 7 &lt;/div&gt;
    &lt;div class="animation"&gt; 8 &lt;/div&gt;
  &lt;/div&gt;</code></pre>
  </div>
  </div>
  </p>