Looping through Input Items to get Min Max Value
<p>I have a question about JQuery Min Max Validation looping through dynamic created input items.
In my php page i have a dynamic table who loops through the data in the DB.
Sometimes i have an table with 3 input Items (Cells) sometimes with 6 or 12 input items.
With jquery i found to validate min - max value of data, but it works only for the first input item.
How can loop throug all the input item to get the same min max validation? </p>

<p>Here the JQuery code:</p>

<pre><code>    $(document).ready(function(){
        $("input").click(function(){

                var enteredValue = $("input:#value_one").val();
                var min=1;
                var max = 3;
                var num = parseInt(enteredValue);

                if (min &gt; num || max &lt; num) {
                    alert('Number ' + num + ' is not a number between ' + min + ' and ' + max);
                    return false;
                }
        });
    });
</code></pre>

<p>Here apart of the PHP HTML Code:</p>

<pre><code>    foreach($datas as $idactivite=&gt;$dat){
        $totalactiv=0;
        $nbdiviseur=0;
        foreach($dat as $dd){
            $totalactiv+=$dd["note"];
            $nbdiviseur++;
        }
        $mamoyactiv=$totalactiv/$nbdiviseur;
        $position=3;
        $mamoyactiv = substr($mamoyactiv, 0, $position);
        $moyenneverticale[$idactivite]=$mamoyactiv;

// Here the input Item who loops through the DB Query to get them values:       

        $htmldroit.="&lt;td id='myguaNote' bgcolor='$bgcolor' align='center'&gt;

        &lt;input name='".$idactivite."_".$idagent."' id='value_one' maxlength='1' class='grand' value='".$dat[$idagent]["note"]."' &gt;&lt;/td&gt;";

        $totalfamille+=$dat[$idagent]["note"];
        $TabRes[$ind] += $dat[$idagent]["note"];
        $TabObj[$ind] = "&amp;nbsp;";
        $TabResColor[$ind]=0;

        $ind++;
    }
</code></pre>

<p>Somebody any ideas?</p>

<p>THX in advance</p>
