[英]table row hover highlighting with Tablesorter / jquery?
I'm using the jquery Tablesorter with the zebra widget for my table. 我正在使用jquery Tablesorter和我的表的zebra小部件。
I want to be able to hover each row and change the background for the highlight. 我希望能够悬停每一行并更改突出显示的背景。 Is this possible?
这可能吗? Anyone with ideas?
谁有想法?
thanks. 谢谢。
Erik 埃里克
var $rows = $('table tbody tr');
$rows.hover(function () {
$(this).addClass("rowHover");
}, function() {
$(this).removeClass("rowHover");
});
Then create the stylesheet rule for zebra rows being hovered: 然后为要悬停的斑马行创建样式表规则:
.even.rowHover,
.odd.rowHover {
background-color: #F0F0F0;
}
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.