Grow your CSS skills. Land your dream job.

(Better/Different) Column Highlighting

  • # July 16, 2009 at 5:26 am

    Just finished the Table 2 video, and the way Chris did column highlighting seemed a bit complex. It might be becaus he wanted to show off the colgroup element, though.

    But if you’re just after column highlighting, quick and easy, you could do this:

    Code:
    var colNo = $(this).prevAll(“td”).size();
    $(“tr td:nth-child(“+ (colNo+1) +”)”).addClass(“hover”);

    Put that inside the hover function, and you should get the same effect, without need for colgroups or class names for each cell. (:

Viewing 1 post (of 1 total)

You must be logged in to reply to this topic.

*May or may not contain any actual "CSS" or "Tricks".