I have a styled table where rows change background colors based on odd and even indexes, with a hover effect included. However, I want to disable the hover effect when a row is selected.
Here's the current code snippet:
.odd{
background: #f7f7f7;
}
.even {
background: #ffffff;
}
th:hover, tr:hover {
background: #e6e6e6;
}
<tr class="myClass ${(k % 2) == 0 ? 'even' : 'odd'}">
$('.myClass').click(function() {
$(this).unbind('mouseenter').unbind('mouseleave');
//I also tried this:
$(this).off('hover');
});