Reputation: 518
$(".csstablelisttd").live('mousedown', function (e)
{ var rowIndex = $(this).closest("tr").index();
var colIndex = $(e.target).closest('td').index();
alert($('.csstextheader').eq(rowIndex).find('td').eq(colIndex).find('span').attr('id'));
});
//I have to find span id on click of cell having rowIndex and colIndex respectively. getting me undefined
Upvotes: 0
Views: 172
Reputation: 17649
Remove the .eq(rowIndex)
.
alert($('.csstextheader').find('td').eq(colIndex).find('span').attr('id'));
Upvotes: 2