title: Changing class of all input fields if one input field is entered
body: <p>I have a page with 3 tables:</p>
  
  <pre><code>&lt;table id="t1"&gt;
    &lt;tr&gt;
      &lt;td&gt;&lt;/td&gt;&lt;td&gt;&lt;input type="text" name="name" /&gt;&lt;/td&gt;
      &lt;td&gt;&lt;/td&gt;&lt;td&gt;&lt;input type="text" name="id" /&gt;&lt;/td&gt;
      &lt;td&gt;&lt;/td&gt;&lt;td&gt;&lt;input type="text" name="perDate" /&gt;&lt;/td&gt;
      &lt;td&gt;&lt;/td&gt;&lt;td&gt;&lt;input type="text" name="email" /&gt;&lt;/td&gt;
    &lt;/tr&gt;
  &lt;/table&gt;
  
  &lt;table id="t2"&gt;
    &lt;tr&gt;
      &lt;td&gt;&lt;/td&gt;&lt;td&gt;&lt;input type="text" name="lostFound"  /&gt;&lt;/td&gt;
      &lt;td&gt;&lt;/td&gt;&lt;td&gt;&lt;input type="text" name="lostDate" /&gt;&lt;/td&gt;
      &lt;td&gt;&lt;/td&gt;&lt;td&gt;&lt;input type="text" name="item" /&gt;&lt;/td&gt;
    &lt;/tr&gt;
  &lt;/table&gt;
  
  &lt;table id="t3"&gt;
    &lt;tr&gt;
      &lt;td&gt;&lt;/td&gt;&lt;td&gt;&lt;input type="text" name="check" /&gt;&lt;/td&gt;
      &lt;td&gt;&lt;/td&gt;&lt;td&gt;&lt;input type="text" name="reason" /&gt;&lt;/td&gt;
      &lt;td&gt;&lt;/td&gt;&lt;td&gt;&lt;input type="text" name="chkDate" /&gt;&lt;/td&gt;
    &lt;/tr&gt;
  &lt;/table&gt;
  </code></pre>
  
  <p>So, I have a validation script where if I just change the class to 'required' then it will make that input field required.  The problem I am having is....I only want to require a field if another field in that table is filled out, otherwise the field is not required.   Ex: If t1 - name is filled in then I want to change the class of t1 - id, t1 - perDate, and t1 - email to 'required', and leave all of the other classes for t2 and t3 untouched.  I was wondering if someone could point me in the right direction with some sort of javascript code that would make this possible.  thanks for all the help, and if more info is needed, please ask.</p>