Highlighting cells (Must know)
Use built-in jQuery traversal methods and selectors to parse the contents of each cell in a table and apply a particular style (for example, a yellow background or a red border) to all cells that meet a specified set of criteria.
Getting ready
Borrowing some data from Tiobe (http://www.tiobe.com/index.php/content/paperinfo/tpci/index.html), create a table of the top five programming languages for 2012. To make it "pop" a bit more, each <td>
in the Ratings column that's over 10 percent will be highlighted in yellow, and each <td>
in the Delta column that's less than zero will be highlighted in red. Each <td>
in the Ratings column should have a class of ratings, and each <td>
in the Delta column should have a class of ...
Get Instant jQuery 2.0 Table Manipulation How-to now with the O’Reilly learning platform.
O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.