title: how to get the row index on TD click using jquery
body: <p>I am trying to get the row no and column no of cell on which user has clicked
  my code is giving the correct column no but row no always giving 0 and 1 </p>
  
  <p>I am using the following code 
     help me to find the reason why giving the row no always 0 and 1</p>
  
  <pre><code>&lt;script&gt;
   $('td').click(function(){
   col = $(this).parent().children().index($(this));
   row = $(this).parent().parent().children().index($(this).parent());
   alert("row no:"+row+"col no :"+col);
   &lt;/script&gt;
  </code></pre>