jquery toggle depending on value of textbox
<p>This must be very simple, but I just got stuck with this... I have a list of products with an input field for the quantity and next to it a column with the prices. The prices are displaying two values. One of them is hidden. If the value of the input field goes over a certain value, it should hide the other price.
Example:
(input: [], show price1price2 )</p>

<pre><code>input: [2], show &lt;span class=one&gt;price1&lt;/span&gt;
input: [5], show &lt;span class=one&gt;price1&lt;/span&gt;
input: [8], show &lt;span class=two&gt;price2&lt;/span&gt;
input: [9], show &lt;span class=two&gt;price2&lt;/span&gt;
</code></pre>

<p>My code so far (example, since I show just 2 products):</p>

<pre><code>&lt;form name="formname" action="formaction" method="post"&gt;
prod 1&lt;input type="text" value="" class="class1" size="3"&gt;&lt;span class="one"&gt;$1.00&lt;/span&gt;&lt;span class="two"&gt;$2.00&lt;/span&gt;
prod 2&lt;input type="text" value="" class="class1" size="3"&gt;&lt;span class="one"&gt;$4.00&lt;/span&gt;&lt;span class="two"&gt;$6.00&lt;/span&gt;
&lt;/form&gt;
</code></pre>

<p>And at the bottom in script tags:</p>

<pre><code>$(document).ready(function() {
    if($('input.class1').val() &gt; 5) {
       $('.one').show();
       $('.two').hide();
    }
});
</code></pre>

<p>What am I missing? The form name perhaps?
This is just the first part... </p>

<p>My other question would be.. how can I make it so that if the sum of all the input fields (with class1 as class) is more than 5, do the same. (So now depending on the sum of the input fields, rather than each individual one)</p>
