title: (Jquery) Find the contents of a td from a selected tr
body: <p>I am very new to JQuery, so appologies for what may be a very simple question.</p>
  
  <p>I have a table, and when i click on a row, i want the cells details to be filled into a form:</p>
  
  <p>so simple example</p>
  
  <pre><code>&lt;table id="table"&gt;
   &lt;tr&gt;&lt;td class="field1"&gt;1 &lt;/td&gt;&lt;td class="field2"&gt;2 &lt;/td&gt;&lt;/tr&gt;
  &lt;/table&gt;
  &lt;input id="input" type="text" /&gt;
  </code></pre>
  
  <p>So the JQuery:</p>
  
  <pre><code>$(document).ready(function() {
     $('#table tr').click(function() {
         $test = $(this).find('td').context.innerText) //problem here *
         $('#input').val( );
     })
  </code></pre>
  
  <ul>
  <li>this returns the innertext of the tr (i.e "1 2"</li>
  </ul>
  
  <p>How am i supose to do it...</p>
  
  <p>Thanks in advance</p>
  
  <p>Andy</p>
  
  <p>Edit: ok in my rush i see i messed up what i was supose to type, here is the js i am trying:</p>
  
  <pre><code>$(document).ready(function() {
     $('#table tr').click(function() {
         $field1 = $(this).find('td.field1').context.innerText) //problem here *
         $('#input1').val($field1);
         $field2 = $(this).find('td.field2').context.innerText) //problem here *
         $('#input12').val($field2);
     })
  </code></pre>
  
  <p>Appologies for the confusion</p>