title: Get node index of td
body: <p>If I have a body like the following... I know that if I click the first radio it returns 1.  If I click the one on the outside of the table it returns 2.  But when I click the nested table's first td it returns its index plus the 'parent's td index in two alerts.  How can I return the nested td index only which should be 2?  This is just a sample table structure that is dynamically built so it needs to work with virtually any table design and any td.  </p>
  
  <p>Any suggestions?<br>
  This is the code I am using to return the index when a user clicks on a td  (I capture other indexes for an input, textarea, etc):</p>
  
  <pre><code>        $("td").click(function (event) {
              var nodeIndex = $("td").index();
              var nodeName = $(this).get(0).nodeName
              alert(nodeName + "," + nodeIndex);
          });
  </code></pre>
  
  <p>This is the sample body:</p>
  
  <pre><code>&lt;body&gt;  
      &lt;input type="radio" /&gt;
          &lt;table class="parent_table"&gt;
              &lt;tr&gt;
                  &lt;td&gt;
                      &lt;table class="nested_table"&gt;
                          &lt;tr&gt;
                              &lt;td&gt;
                                  Sample Text&lt;/td&gt;
                              &lt;td&gt;
                                  &amp;nbsp;&lt;/td&gt;
                          &lt;/tr&gt;
                      &lt;/table&gt;
                  &lt;/td&gt;
                  &lt;td&gt;
                      &amp;nbsp;&lt;/td&gt;
              &lt;/tr&gt;
          &lt;/table&gt;
         &lt;input type="radio" /&gt;
      &lt;/body&gt;
  </code></pre>