I have a table, and I want to do this when I find a cell, it highlights this cell and symmetric, for example, if I put the mouse in cell (3,1), it highlights this cell and (1,3). I have this code:
$('td').on('mouseover mouseout', function(){ $(this) .add($(this).parent().parent() .children()[$(this).index()]).toggleClass('hover'); });
Thus, I can select the correct row, but I need to select only the correct cell in this row, it is a symmetric cell. I tried with some selectors, but I cannot go to this cell.
Here is an example
source share