Jquery Datatable列筛选器不使用tfoot标记colspan(页脚)

Jquery Datatable列筛选器不使用tfoot标记colspan(页脚),jquery,html,codeigniter,datatable,datatables,Jquery,Html,Codeigniter,Datatable,Datatables,我正在尝试使用jquery.dataTables.ColumnFilter.js在DataTable中添加ColumnFilter,它成功地生成了过滤器。但当我在表中添加带有colspan的tfoot时,它就不起作用了 --------------------------------------------------------- ID | Name | Marks | Result | ------------------------

我正在尝试使用jquery.dataTables.ColumnFilter.js在DataTable中添加ColumnFilter,它成功地生成了过滤器。但当我在表中添加带有colspan的
tfoot
时,它就不起作用了

---------------------------------------------------------
ID  |   Name        |       Marks       |   Result      |
---------------------------------------------------------
1   |   A           |       100         |       Pass    |
1   |   B           |       90          |       Pass    |
1   |   C           |       80          |       Pass    |
1   |   D           |       100         |       Pass    |
1   |   E           |       70          |       Pass    |
1   |   F           |       59          |       Pass    |
---------------------------------------------------------
        Total       |       580         |               |
---------------------------------------------------------
实际上,我想在上面的表类型中添加过滤器,但当我将tfoot和ColSpan放在一起时,它并没有将过滤器放在结果表上。 我的代码如下:-

HTML

<div class="form-group col-md-3">
    <label for="bragSection">Name</label>
    <div id="name"></div>
</div>

<div class="form-group col-md-3">
    <label for="bragSection">Result</label>
    <div id="result"></div>
</div>

<table id="show_countries_currencies" class="table table-bordered table-striped">
    <thead>
        <tr>
            <th>Id</th>
            <th>Name</th>
            <th>Marks</th>
            <th>Result</th>
        </tr>
    </thead>
    <tfoot>
        <tr>
            <th colspan="2" style="text-align:right"></th>
            <th></th>
        </tr>
    </tfoot>
</table>

名称
结果
身份证件
名称
标志
结果
JAVASCRIPT

$(document).ready(function() {
dTable = $('#show_countries_currencies').dataTable({
            "oLanguage": {
                "sLengthMenu": "Display _MENU_ Records",
                "sZeroRecords": "<center>No Record Found!</center>",
                "sInfo": "Showing _START_ to _END_ of _TOTAL_ Records",
                "sInfoEmpty": "Showing 0 to 0 of 0 Records",
                "sInfoFiltered": "(filtered from _MAX_ total Records)",
            },
            "columns": [{
                    "width": "5%"
                }, {
                    "width": "5%"
                }, {
                    "width": "5%"
                }],
            bstateSave: true,
            responsive: true,
            bJQueryUI: false,
            bProcessing: true,
            bServerSide: true,
            sSearch: false,
            bFilter: true,
            iDisplayLength: 10,
            sAjaxSource:  "get_result.php",
            aoColumns: [{
                    "sName": "id",
                    "bSearchable": false,
                    "bSortable": true,
                    "className": "text-center tableIcon"
                }, {
                    "sName": "name",
                    "bSearchable": true,
                    "bSortable": true,
                    "className": "text-center tableIcon"
                }, {
                    "sName": "result",
                    "bSearchable": true,
                    "bSortable": true,
                    "className": "text-center tableIcon"
                }],
            aaSorting: [
                [0, 'desc']
            ]
        });
        $('#show_countries_currencies').dataTable().columnFilter({
            sRangeFormat: "<label class='dateRange1'>From</label> {from} <label class='dateRange2'>To</label> {to}",
            aoColumns: [null,{
                        type: "text",
                        sSelector : "#name"
                    },{
                    type: "select",
                    sSelector: "#result",
                    values: ["Pass","Fail"]
                }]
        });
});
$(文档).ready(函数(){
数据表=$('show#u countries_currency')。数据表({
“语言”:{
“长菜单”:“显示菜单记录”,
“sZeroRecords”:“未找到任何记录!”,
“sInfo”:“显示总记录的开始到结束”,
“sInfoEmpty”:“显示0条记录中的0到0条记录”,
“sInfoFiltered”:(从最大总记录中筛选),
},
“栏目”:[{
“宽度”:“5%”
}, {
“宽度”:“5%”
}, {
“宽度”:“5%”
}],
bstateSave:对,
回答:是的,
bJQueryUI:错,
b处理:对,
观察家方面:是的,
研究:错,
B过滤器:是的,
i显示长度:10,
sAjaxSource:“get_result.php”,
AO列:[{
“sName”:“id”,
“可搜索”:错误,
“可移植”:是的,
“className”:“文本中心表格图标”
}, {
“sName”:“name”,
“可听”:是的,
“可移植”:是的,
“className”:“文本中心表格图标”
}, {
“sName”:“结果”,
“可听”:是的,
“可移植”:是的,
“className”:“文本中心表格图标”
}],
A排序:[
[0,‘描述’]
]
});
$(“#显示_国家_货币”).dataTable().columnFilter({
sRangeFormat:“从{From}到{To}”,
aoColumns:[null{
键入:“文本”,
选择器:“名称”
},{
键入:“选择”,
选择符:“#结果”,
值:[“通过”、“失败”]
}]
});
});