I see this post on highlighting even columns but can I highlight only selected columns?
Here is the code they use:
$(\"table.Table22 > tbody >
have you concidered using colgroups instead of adding classes to every cell?
i only recently started to see the power of colgroups myself, and they work like this:
.highlight {
background-color: yellow;
}
header1
header2
header3
header4
header5
cell a
cell b
cell c
cell d
cell e
this would render a table with 5 columns, where 1 column has css class to highlight the first col. so actually the only thing you have to do then, add a function to the hover of each cell, to just add the highlighting class to the corresponding colgroup.
there is a complete videoguide you can find right here:table fix header, and row + column highlighting.
*EDITED the answer because it was irrelevant, i read the question wrong, and answered to a totally different matter. (added a correct reply now)
- 热议问题