get the jquery index of "td" element
<p>I have markup</p>

<pre><code> &lt;table&gt;
    &lt;tr id="1"&gt;
        &lt;td colspan="4"&gt;
            &lt;p class="que"&gt;
                1. Who are you?&lt;/p&gt;
        &lt;/td&gt;
    &lt;/tr&gt;
    &lt;tr class="ans"&gt;
        &lt;td&gt;
            &lt;input type="checkbox" /&gt;Student
        &lt;/td&gt;
        &lt;td&gt;
            &lt;input type="checkbox" checked="true" /&gt;Developer
        &lt;/td&gt;
        &lt;td&gt;
            &lt;input type="checkbox" /&gt;Other
        &lt;/td&gt;
        &lt;td&gt;
            &lt;input type="text" /&gt;
        &lt;/td&gt;
    &lt;/tr&gt;

&lt;/table&gt;​​​
</code></pre>

<p>Here I want to get the index of the particular td which has its checkbox checked. For example here it should be 1. But I m getting 0 eachtime which seems like the index of the row.
Here is the jquery code I have used.</p>

<pre><code>   var answers = $('table tr.ans');
 $.each(answers, function () {
  var answer = $(this).find("input[type='checkbox']:checked").index(); 
    alert(answer);                   
  });​
</code></pre>

<p>and here is the <a href="http://jsfiddle.net/parush/Xj8aK/" rel="nofollow">fiddle</a>
How do I get the index of the particular td?
Thanks</p>
