DataTable固定标头未应用 [英] DataTable Fixed Header Not Being Applied

查看:56
本文介绍了DataTable固定标头未应用的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我有一个使用数据表插件的表. 我正在尝试固定表格标题,并点击以下链接:此处

I have a table using datatables plug-in. I'm trying to make my table header fixed, and follow this link : here

$('.device-table').DataTable( {
    "fixedHeader": {
        header: true,
    },
    "bLengthChange": false,
    "Filter": false,
    "Info": false,
} );

我看不到效果.我同时包含了datatables和fixedHeader的js文件:

I don't see the effect. I've included both js files of datatables and fixedHeader:

<script src="https://cdn.datatables.net/1.10.12/js/jquery.dataTables.min.js"></script>
<script src="https://cdn.datatables.net/fixedheader/3.1.2/js/dataTables.fixedHeader.min.js" type="text/javascript"></script>

人们将如何进行调试?

推荐答案

要使fixedHeader插件正常工作,您还需要css文件:

For the fixedHeader plugin to work you also need the css file:

<link rel="stylesheet" type="text/css" href="https://cdn.datatables.net/fixedheader/3.1.2/css/fixedHeader.dataTables.min.css">

检查此更新:
https://jsfiddle.net/s2xbf9d0/6/

Check this update:
https://jsfiddle.net/s2xbf9d0/6/

这篇关于DataTable固定标头未应用的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆