使用jquery tablesorter更改子行颜色 [英] Change child row color using jquery tablesorter

查看:69
本文介绍了使用jquery tablesorter更改子行颜色的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我正在使用tablesorter jquery add的修改版本。

I am using the modified version of the tablesorter jquery add on.

http://www.pengoworks.com/workshop/jquery/tablesorter/tablesorter.htm

我需要折叠的行来获取一个coloe,而不是父行的颜色。

I need the collapsed rows to take one coloe and not the parent rows color.

即使我明确设置子颜色,它仍然被父行超级控制颜色。

Even when i explicitly set the child color, it is still super-ceded by the parent row color.

我如何打破这种逻辑

推荐答案

你刚才需要增加 CSS特异性子行。唯一的问题是父行有一个行 - 跨越子行的单元格,因此它不会与子行的其余部分进行样式化。

You just need to increase the CSS specificity of the child rows. The only issue is that the parent row has a cell that row-spans into the child row, so it won't be styled with the rest of the child row.

试试这个css(当然使用你想要的颜色); 这是一个演示

Try this css (of course use the color you want); here is a demo:

table.tablesorter .expand-child.odd td,
table.tablesorter .expand-child.even td {
    background: #7ff;
}

这篇关于使用jquery tablesorter更改子行颜色的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆