Bunu dener misiniz? $(document).ready(function () {
$('.wikitable.item').each(function () {
var currentTable = $(this);
var cells = currentTable.find('td, th');
cells.hover(function () {
var $this = $(this);
var columnIndex = $this.index();
var rowIndex = $this.parent().index();
$this.parent().find('td, th').addClass('highlight-cell');
cells.filter(function() {
return $(this).index() === columnIndex;
}).addClass('highlight-cell');
if ($this.attr('colspan')) {
var colspan = parseInt($this.attr('colspan'));
for (var i = 0; i < colspan; i++) {
cells.filter(function() {
return $(this).index() === columnIndex + i;
}).addClass('highlight-cell');
}
}
if ($this.attr('rowspan')) {
var rowspan = parseInt($this.attr('rowspan'));
for (var i = 0; i < rowspan; i++) {
currentTable.find('tr').eq(rowIndex + i).find('td, th').addClass('highlight-cell');
}
}
}, function () {
cells.removeClass('highlight-cell');
});
});
});.highlight-cell {
background-color: var(--background-color-quiet--hover) !important;
}