使用多个表和条件tds

时间:2012-04-15 21:50:27

标签: javascript jquery-datatables

我正在使用datatables表插件,我在我的网站上全局使用它,这样我就可以让所有表使用相同的设置。我想要做的是将它设置为它遇到具有某个id的其中一个的位置,然后它取消排序并调整列的大小但不确定如果能够如何做到这一点td有一定的身份。

$(window).load(function(){
var oTable = $('.dataTable').dataTable({
} );

$('.selectall').toggle(
    function() {
        $(this).closest('.table').find('.messages').prop('checked', true);
        $(this).prop('checked', true)
    },
    function() {
        $(this).closest('.table').find('.messages').prop('checked', false);
        $(this).prop('checked', false)
    }
);
});

1 个答案:

答案 0 :(得分:0)

我决定只创建一个js脚本页面,其中包含每个表的所有不同代码并保存。