Jquery 将列筛选器显示为标题中的第二行

Jquery 将列筛选器显示为标题中的第二行,jquery,datatables,Jquery,Datatables,我使用此代码在页脚中显示列过滤器,效果非常好,请参见 我的代码是: $(document).ready(function() { // Setup - add a text input to each footer cell $('#example tfoot th').each( function () { var title = $(this).text(); $(this).html( '<input type="text" place

我使用此代码在页脚中显示列过滤器,效果非常好,请参见

我的代码是:

$(document).ready(function() {
    // Setup - add a text input to each footer cell
    $('#example tfoot th').each( function () {
        var title = $(this).text();
        $(this).html( '<input type="text" placeholder="Search '+title+'" />' );
    } );

    // DataTable
    var table = $('#example').DataTable();

    // Apply the search
    table.columns().every( function () {
        var that = this;

        $( 'input', this.footer() ).on( 'keyup change', function () {
            if ( that.search() !== this.value ) {
                that
                    .search( this.value )
                    .draw();
            }
        } );
    } );
} );
$(文档).ready(函数(){
//设置-向每个页脚单元格添加文本输入
$('#示例tfoot th')。每个(函数(){
var title=$(this.text();
$(this.html(“”);
} );
//数据表
变量表=$(“#示例”).DataTable();
//应用搜索
table.columns().every(函数(){
var=这个;
$('input',this.footer()).on('keyup change',函数(){
如果(that.search()!==this.value){
那个
.search(this.value)
.draw();
}
} );
} );
} );

问题是我希望过滤器正好位于页眉下方,而不是页脚下方。我试图使用css更改
tfoot
标记的位置,但它在IE上不起作用。

看看Nup,没有一个在Internet Explorer上起作用看看Nup,没有一个在Internet Explorer上起作用