SyntaxFix
Write A Post
Hire A Developer
Questions
Try this,
$('td').click(function(){ var row_index = $(this).parent().index(); var col_index = $(this).index(); });
If you need the index of table contain td then you can change it to
var row_index = $(this).parent('table').index();