开发者

Jquery table tr:odd

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

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜