[英]Slimscroll and jQuery Datatable
Im trying to do mix them. 我正在尝试混合它们。 use a slimlcroll with jQuery DataTable (no pagination).
与jQuery DataTable一起使用slimlcroll(无分页)。 So, I found these examples:
因此,我找到了以下示例:
Nice simple use of slimscroll 漂亮的简单使用slimscroll
Now I tried to make the content of the table use slim scroll but it just doesnt work :( 现在,我试图使表的内容使用细长滚动,但它不起作用:(
what I tried is to put a div serrounding the tbody - and slimscoll that div: 我想做的是将div围绕着琴身-并把divslimscoll设置为:
<div id="slimtest1">
<tbody>
...
</tbody>
</div>
http://jsfiddle.net/yossico/hxkvfs60/2/ http://jsfiddle.net/yossico/hxkvfs60/2/
I also try to slim scroll the tbody directly: http://jsfiddle.net/yossico/hxkvfs60/3/ 我也尝试直接瘦一下tbody: http : //jsfiddle.net/yossico/hxkvfs60/3/
<tbody id="slimtest1">
...
</tbody>
What I want is to scroll the table body via slimscroll and not with the default scrollbar. 我想要的是通过slimscroll而不是使用默认滚动条来滚动表格主体。 None of this worked - can someone please show me the light?
这些都不起作用-有人可以给我看看光吗?
Thanks :) 谢谢 :)
Check the Updated JSFiddle :- JSFiddle 检查更新的JSFiddle: -JSFiddle
<table id="example" class="display" cellspacing="0" width="100%">
....
<tbody id="slimtest1">
......
</tbody>
</table>
CSS CSS
thead, tbody { display: block; }
tbody {
height: 200px; /* For the demo */
overflow-y: auto; /* Vertical scroll */
overflow-x: hidden; /* Hide the horizontal scroll */
}
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.