title: If statement only works on the first instance
body: <p>I have an IF statement very similar to this Fiddle here:</p>
  
  <p><a href="http://jsfiddle.net/fz4wF/43/" rel="nofollow">http://jsfiddle.net/fz4wF/43/</a></p>
  
  <p>What I'm wanting to know is, how do I display the <code>alert()</code> only once ALL divs with the <code>.ccn</code> class have a value over 1000, not just the first instance. I have tried the <code>each()</code> function but I'm not too sure how to use it.</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>$(".ccn").keyup(function() {
    if ($(".ccn").val() &gt;= 1000)
      alert('test');
  });</code></pre>
  <pre class="snippet-code-html lang-html prettyprint-override"><code>&lt;div class="cardNumber"&gt;
    &lt;input type="text" value="" maxlength="4" name="ccn" class="ccn"&gt;
    &lt;input type="text" value="" maxlength="4" name="ccn" class="ccn"&gt;
    &lt;input type="text" value="" maxlength="4" name="ccn" class="ccn"&gt;
    &lt;input type="text" value="" maxlength="4" name="ccn" class="ccn"&gt;
  &lt;/div&gt;
  
  &lt;ul&gt;
    &lt;li class="checkNumber"&gt;Card Number&lt;/li&gt;
  &lt;/ul&gt;</code></pre>
  </div>
  </div>
  </p>