Search through an HTML Table and find text fields with required classes
<p>I'm creating a validation script for a multi-step form, each group is inside a table and I want to check that the containing table has a required field inside it.</p>

<p>I've tried to implement this as below:</p>

<p>(where a = table id
.required = class, but the classes are like class = "something required")</p>

<pre><code>function validForm(a) {
    var myVar = $('a').find('.required').val();
    alert(myVar);
}
</code></pre>

<p>the problem is that this code returns <em>undefined</em>. This is my first time using a <code>.find</code> function and I am having a hard time understanding how to use it.</p>

<p>HTML:</p>

<pre><code>&lt;table id = "default"&gt;
&lt;tr&gt;&lt;td&gt;Default&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td&gt;Field name&lt;/td&gt;&lt;td&gt;&lt;input type="text" name="first_name" maxlength="35" class="txtfield-cu1 required" title="First Name"&gt;&lt;/td&gt;&lt;/tr&gt; &lt;- repeat a couple of times
</code></pre>
