1
我目前正在編寫分頁,此分頁涉及使用tablesorter.com進行排序的列。使用複選框在全行表上添加背景顏色
請參閱tablesorter中的jquery代碼的底部,它允許我在每一行上使用帶有複選框的分揀機,一旦複選框被選中,我想使用css添加背景顏色,如果複選框不勾選然後刪除背景顏色,有沒有人幫助我如何爲背景顏色編寫額外的代碼行!
非常感謝。
$(function() {
// add ie checkbox widget
$.tablesorter.addWidget({
id: "iecheckboxes",
format: function(table) {
if($.browser.msie) {
if(!this.init) {
$(":checkbox",table).change(function() { this.checkedState = this.checked});
this.init = true;
}
$(":checkbox",table).each(function() {
$(this).attr("checked",this.checkedState);
});
}
}
});
$("table").tablesorter({widgets: ['iecheckboxes']})
});
非常感謝您的幫助,效果很好。 – user3290657