I have this js code:
$(".main-vervolg .right .bottom .panes table.grey tbody tr:odd").css("background-color", "#f8f8f8");
And it is working fine but when I have 2 separated tables with the class grey he is counting further in the second table but I want that he will starts again开发者_如何学C.
How can I do this?
Try the following:
$('.main-vervolg .right .bottom .panes table.grey').each(function() {
$('tbody tr:odd', this).css("background-color", "#f8f8f8");
});
It loops through all tables with selector
精彩评论