title: Using jQuery, how could I reference the second to last column of a html table row or by class name?
body: <p>I have a button inside a td of a html table.  When I click on the button I want to enter certain text into the second to last column of the current row.</p>
  
  <p>I see I can do </p>
  
  <pre><code> td:first
  </code></pre>
  
  <p>or </p>
  
  <pre><code>td:nth-child(3)
  </code></pre>
  
  <p>but how can I reference the second to last column of the current table?</p>
  
  <pre><code> &lt;table&gt; 
    &lt;tr&gt;&lt;th&gt;1&lt;/th&gt;&lt;th&gt;2&lt;/th&gt;&lt;/tr&gt;
    &lt;tr&gt;&lt;td&gt;&lt;/td&gt;&lt;td&gt;&lt;input type='button' class="myButton"&gt;&lt;/td&gt;&lt;/tr&gt;
   &lt;/table&gt;
  </code></pre>
  
  <p>alternatively, I could put a class name on the column td if that makes it easier to reference.</p>