[thelist] Alternating Rows
Burhan Khalid
burhankhalid at members.evolt.org
Mon Oct 7 14:00:01 CDT 2002
j> if you only need to support ie, then using a css expression would do the trick. something like this (beware of wrap):
j> .data tbody td {
j> background-color: expression((this.parentElement.rowIndex % 2 == 0) ? 'buttonface' : 'window');
j> color: expression((this.parentElement.rowIndex % 2 == 0) ? 'buttontext' : 'windowtext');
j> }
That would have been my suggestion. However, I would guess that is a
way to do the same thing using the DOM, although I am not a DOM expert
so I couldn't tell you how. You might want to check up on accessing
elements using the array ([]) indexing, that way you can use similar
mod zero tricks to switch colors.
--
*---------------*
| Burhan Khalid |
*---------------*-------------------------------*
| Email : burhankhalid[at]members.evolt.org |
| Web : members.evolt.org/burhankhalid |
| ICQ : 6016166 |
| AIM : digitz0819 |
| MSN : burhankh[at]hotmail.com |
| Yahoo : burhan_khalid |
*-----------------------------------------------*
| mushkil hai zabas kalaam mera ai dil |
| sun sun ke ise suKhan_varaa.N-e-kaamil |
| aasaan kahane kii karate hai.n faramaaish |
| goim mushkil vagaranaa goim mushkil |
|-----------------------------------------------|
| Too hard to grasp is my verse, O heart! |
| Hearing it, the connoisseurs of art |
| For a simpler style do ask |
| Difficult, if I write, difficult, if I do not |
*-----------------------------------------------*
More information about the thelist
mailing list