Check for atleast one filled field in jQuery/javascript
<p><a href="http://stackoverflow.com/questions/7407865/check-if-atleast-one-field-is-not-empty-in-php">Check if atleast one field is not empty in PHP</a></p>

<p>is very equal to this question. This is just how to do it in javascript.</p>

<p>When you click on #submit it should check atleast one of these fields:</p>

<pre><code>input[name=weight], input[name=size_1], input[name=size_2], input[name=size_3]
</code></pre>

<p>are filled, and not empty. If all of them are empty, it should alert("Please fill one of the fields")</p>

<p><strong>Update: forgot to mention that if the fields are 0 it should not be counted as filled.</strong></p>

<p>How can i do this? I tried copy over from php, but i get stuck on the foreach loop</p>
