Forum Moderators: not2easy
Another alternate:
if (typeof(jQuery)!='undefined') { //check if jquery is loaded on this page
$(document).ready(function() {
$("table[stripe='true'] tbody > tr:odd").addClass("odd");
$("table[stripe='true'] tbody > tr:even").addClass("even");
});
}
with putting this in my index.php
<style>
.odd { background-color: #f2f2f2; }
.even { background-color: #fff; }
</style>
the code generated in IE using the 2nd code is like this:
<TR class=even>
<TD class=date>20-03-2009</TD>
<TD><A href="#">example</A></TD>
<TD>14</TD>
<TD>3</TD>
<TD><BR></TD></TR>
<TR class=odd>
<TD class=date>24-02-2009</TD>
<TD><A href="#">example</A></TD>
<TD>20</TD>
<TD>1</TD>
<TD><BR></TD></TR>
Any idea to solve this problem?
Thank you in advance!
Cheers,
Arch
[edited by: swa66 at 2:07 am (utc) on Aug. 5, 2009]
[edit reason] examplified, removed uninteded smileys [/edit]
<TR>
<TH width="10%">Date</TH>
<TH>Title</TH>
<TH>Votes</TH><!--<th width="5%"><img src="/image/comments.png" title="Comments"></th>-->
<TH>Comments</TH>
<TH>Expiry</TH></TR></THEAD>
<TBODY>
<TR class=even>
<TD class=date>20-03-2009</TD>
<TD><A href="/poll_detail.html?poll_ident=12">foo text</A></TD>
<TD>14</TD>
<TD>3</TD>
<TD><BR></TD></TR>
<TR class=odd>
<TD class=date>24-02-2009</TD>
<TD><A href="/poll_detail.html?poll_ident=11">foo text</A></TD>
<TD>20</TD>
<TD>1</TD>
<TD><BR></TD></TR>
I am working on another server but the live one should look like <>
[edited by: SuzyUK at 9:07 am (utc) on Aug. 5, 2009]
[edit reason] No URI's thanks, & fixed scroll [/edit]
This is a very nice website that tells IE CSS bugs:
[positioniseverything.net...]