Download the most recent version from the scripts page.
There are two ways to set up the script. You can either use an id for a specific table, and call the function for each table; or if there are multiple tables on the same page, you can pick tables by assigning the same class to all of them and calling stripeClass() as described at the end*.
<table id="testTable">
/* odd rows */
.oddrow {background-color: inherit
}
/* even rows */
.evenrow {background-color: #eef
}
<script type='text/javascript'>stripe("testTable")</script>
stripe("testTable","snazzy","dull")<table class="stripedtables">
stripeClass() script with the class name of the tables that should be striped as the first argument:
<script type='text/javascript'>stripeClass("stripedtables")</script>| head row | Onse dolendit iliquat. |
|---|---|
| second row | Sectem nullum erat eliquatum. |
| third row | |
| fourth row has a color assigned | note that this row is skipped |
| fifth row | this cell has a color asigned |
| sixth row | which has no effect on striping |
| seventh row | etc |
| eighth row | etc |
| ninth row has class assigned | note that this row is skipped |
| etc | etc |
| etc | etc |
| etc | etc |
| etc | etc |
| etc | etc |
| etc | etc |
| etc | etc |
copyright © 2006 eightize
This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; either version 2 of the License, or (at your option) any later version.
This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details.
You should have received a copy of the GNU General Public License along with this program; if not, write to the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.