title: Getting column number from td
body: <p>Writing an extension for <strong><em>tablesorter</em></strong>.. though its my first attempt at extending any js. I have a number of <code>&lt;select&gt;</code>s within a row of <code>&lt;td&gt;</code>s &amp; need to know the column this td sits in.</p>
  
  <p>When a value is changed in any of these selects e.g.</p>
  
  <pre><code>$('select').change(function(){
  
  });
  </code></pre>
  
  <p>I need to get hold of the column this select is <em>sitting</em> in to set <code>col</code> for:</p>
  
  <pre><code>('tr.result &gt; td:nth-child('+col+')').each(function(){
  </code></pre>
  
  <p>Is there a way I can get this from the td select is in?!?</p>
  
  <p>--
  solution for my specific problem was:</p>
  
  <pre><code>$('select').change(function(){
  
      td  = $(this).parent('td');
  
      col = $(td).parent().children().index(td);
  
  });
  </code></pre>