title: Get first and second td element in row
body: <p>I have an ajax call attached to the click event of a pic inside a table row. Once the pic is clicked and the click event initiated, I need to grab the first and second <code>td</code> elements from that row. I'm new to jQuery so what I have below is my latest attempt (not working..). The variables <code>firstName</code> and <code>lastName</code> both wind up being <code>undefined</code> after those lines are executed</p>
  
  <pre><code>        $('.checkErrors').click(function () {
              var firstName = $(this).parent('tr td:first-child').val();
              var lastName = $(this).parent('tr td:nth-child(2)').val();
              $.ajax({
                  type: 'GET',
                  url: '@Url.Action("GetErrors","AgentTransmission")',
                  data: { term: $(this).attr('id') },
                  .
                  .
              });
            });
  </code></pre>
  
  <p>Here is a sample table row. The image in the last <code>td</code> element contains the <code>.click</code> event. I would like to grab the first two that contain the text "phinneas" and "ferbseven". </p>
  
  <pre><code>&lt;tr&gt;
      &lt;td&gt;
          phinneas
      &lt;/td&gt;
      &lt;td&gt;
          ferbseven
      &lt;/td&gt;
      &lt;td nowrap&gt;
          7735        
      &lt;/td&gt;
      &lt;td&gt;
          Agent
      &lt;/td&gt;
      &lt;td&gt;
          SAF
          &amp;nbsp;&amp;nbsp
          07070900  
      &lt;/td&gt;
      &lt;td&gt;
          6/5/2013 10:35:38 AM
      &lt;/td&gt;
      &lt;td&gt;
          DANTAK
      &lt;/td&gt;
      &lt;td class="errorPlus"&gt;
          Error
      &lt;/td&gt;            
      &lt;td&gt;
  
          &lt;a href="/AgentTransmission/Details/2358"&gt;Details&lt;/a&gt;           
              &lt;span&gt; | &lt;/span&gt;
          &lt;a href="/AgentTransmission/Edit/2358"&gt;Edit&lt;/a&gt;        
      &lt;/td&gt;
      &lt;td align=center id=2358&gt;
              &lt;img src="/Content/images/magnify.gif" class="checkErrors" id=2358 alt="Program Details" /&gt;
      &lt;/td&gt;
  &lt;/tr&gt;
  </code></pre>