This example demonstrates using JQuery selectors to add css classes to specific html table row elements.
- Add JQuerify bookmarklet to this page. (Get JQuerify here)
- $("#myColourTable tr:odd").addClass("tablerow"); $("#myColourTable tr:even").addClass("tablealtrow");
- $("#myColourTable tr:first").removeClass("tablealtrow").addClass("heading");
Row Number | Big Number | Word | Date |
---|---|---|---|
1 | 4345 | Animal | 23 January 1987 |
2 | 32546 | Vegetable | 18 November 2005 |
3 | 265 | Mineral | 9 September 1973 |
4 | 4456 | Element | 31 December 1976 |
5 | 56 | Zebra | 14 August 2008 |
No comments:
Post a Comment