Friday, July 22, 2011

CSS, jquery alternate row color compatible with IE7 and IE8

CSS
.tableClass{
}
.odd { background-color: blue; }
.even { background-color: white; }

jQuery
$(function() {   
    //
    $('.tableClass tr:even').addClass('even');
    $('.tableClass tr:odd').addClass('odd');
});

No comments:

Post a Comment