title: Stop multiple animations untill another animation gets completed
body: <p>Stop multiple animations while clicking button multiple times untill animation gets completed with the help of following code.<br>
  Declare one global variable  </p>
  
  <pre><code>var animateFinish = true;  
  </code></pre>
  
  <p>And here I am starting with click action  </p>
  
  <pre><code>$('#button').on('click', function(e){
      if(animateFinish){
          animateFinish = false;
          $('.selector').animate({'margin-left':'100px'},"fast",'linear',function(){  
               animateFinish = true;
          }
      }  
  }
  </code></pre>
  
  <p>1. Globally declare a variable as True (animateFinish).<br>
  2. First time it satisfies the condtion.<br>
  3. Immediately it is modified as false.<br>
  4. After completing animation it gets reverted.<br>
  5. Now, if you check it, till the animation gets completed event will not animated.<br>
  Sorry for my english.</p>