tablecloth.js是一个能够只用寥寥几行代码即可快速美化你页面上HTML代码的jQuery插件。
tablecloth.js自身携带了多种表格风格,同时支持表格的排序功能,使用也极其简单。
如何使用
在你的HTML当中包含jQuery、Bootstrap以及tablecloth.js随包发行的其他几个js文件(如果你想要tablecloth.js的全部功能的话)。
紧接着只需要这样就可以了:
// 无参初始化
$("table").tablecloth();
// 或者含参初始化
$("table").tablecloth({
theme: "default",
bordered: true,
condensed: true,
striped: true,
sortable: true,
clean: true,
cleanElements: "th td",
customClass: "my-table"
});
好了,你的表格从此美丽了。
许可证
tablecloth.js采用MIT协议进行发行。