Q:

How to highligh the row and column of a table when over a cell using jQuery?

I have a table 10x10 in html
if I add a function for each td hover, 
how can I get the cell column and row index?
Thanks.

A:

As others have said, there may be a better way of doing things than trying to find the exact cell location, but if you do need it this should work:
$("td").hover(function() {
    var columnIndex = $(this).attr("cellIndex");
    var rowIndex = $(this).parent().attr("rowIndex"));
});

