jQuery.each(values, function(i,v){ ... }) Why v is undefined?
<p>I have several textboxes which I need to check before post them back. I do this with jQuery using each function. When the submit button is pressed (LinkButton1) I iterate over the textboxes and check they values:</p>

<pre><code>&lt;asp:textbox id="txt1" class="tocheck" runat="server /&gt;
&lt;asp:textbox id="txt2" class="tocheck" runat="server /&gt;
&lt;asp:textbox id="txt3" class="tocheck" runat="server /&gt;

$('#LinkButton1').click(function () {
    var error = false;
    $.each('.tocheck', function (i, v) {
        checkVal(v.val());
    });
});
</code></pre>

<p>But a runtime error is thrown saying v is undefined:</p>

<p><img src="http://i.stack.imgur.com/AlCzX.jpg" alt="enter image description here"></p>

<p>How can I retrieve the textbox value?</p>

<p>Thank you.</p>
