title: How to avoid jquery .click() event spam
body: <p>I want to know how to protect the jQuery .click() (or whatever) event to spawm.
  I creat a project file in JSFiddle, you can set it above. If you can always click in the <code>&lt;body&gt;</code> the next <code>&lt;li&gt;</code> item always get the <code>.curr-str</code> class, but the animation isn't finished.</p>
  
  <p>I try this:</p>
  
  <pre><code>    if($('body').is(':animated'){
  alert("animate is progress, wait");
  }
  </code></pre>
  
  <p>but it's not working...</p>
  
  <p>The test code:</p>
  
  <p>HTML:</p>
  
  <pre><code>&lt;div class="list"&gt;
  
      &lt;ul&gt;
          &lt;li class="curr-str"&gt;JavaScript&lt;/li&gt;
           &lt;li&gt;JavaScript&lt;/li&gt;
           &lt;li&gt;JavaScript&lt;/li&gt;
           &lt;li&gt;JavaScript&lt;/li&gt;
  
      &lt;/ul&gt;
  
  &lt;/div&gt;
  </code></pre>
  
  <p>CSS:</p>
  
  <pre><code>.curr-str{
      background-color:green;
  }
  </code></pre>
  
  <p>Javascript:</p>
  
  <pre><code>$( 'body' ).click(function() {
      $current = $(".curr-str");
    $( $current ).next('li').addClass('curr-str').fadeOut(5000);
  });
  </code></pre>
  
  <p><a href="http://jsfiddle.net/em0ahdsy/" rel="nofollow">JSFiddle</a></p>