Automatic Coloured Rows

By Anton Peck on May 30, 2006

General

Tired of adding even and odd classes to your tables to distinguish the rows? This script will do it for you automatically. You can even use it with lists!


Browsers Hits Percent
Mozilla Firefox 15772 73%
Internet Explorer 6 4581 21.2%
Mozilla 442 2%
Opera 122 0.5%
Safari 100 0.4%
Netscape 99 0.4%

Notes

Source Code

Paste this source code into the designated areas.

External file

Paste this code into an external JavaScript file named: autoRows.js


CSS

Paste this code into your external CSS file or in the <style> section within the HEAD section of your HTML document.


Head

Paste this code into the HEAD section of your HTML document.


Body

Paste this code into the BODY section of your HTML document


Comments

Blog comments powered by Disqus