I need a pure Javascript (no jQuery) hover effect for HTML table columns.
I found this which supposedly contains a fix for Firefox yet it still looks broken to me.
I found this which works only for the first column.
Unfortunately, my Javascript skills are amateur at best, so my attempts to modify either of these turned out to be fruitless.
Is this possible? Any suggestions would be appreciated.
Here’s a column-based approach. When the mouse enters/leaves a cell, find the corresponding
<col/>by index and apply/remove the desired class:See also:
Element.classListNode.Contains()Element.Closest()