November 18th, 2008 By: Wes
Zebra Striping a table with jQuery is ridiculously easy. This code will add even and odd classes to every row in all tables:
You can make it more selective by changing the
table part in $("table tr:odd") to something like table.stripe, so it will only apply to tables with a stripe class.
Of course you’ll have to throw in some CSS so the even and odd classes actually do something:
No comments:
Post a Comment