Slimscroll和jQuery Datatable [英] Slimscroll and jQuery Datatable
问题描述
所以,我发现这些例子:
现在我试图使表格的内容使用细长的滚动,但它只是不工作:(
我试过的是把一个div放在tbody上,而slimscoll是div:
< div id = slimtest1>
/ pre>
< tbody>
...
< / tbody>
< / div>
http://jsfiddle.net / yossico / hxkvfs60 / 2 /
我也尝试修剪直接滚动tbody: http://jsfiddle.net/yossico/hxkvfs60/3/
< tbody id =slimtest1>
...
< / tbody>
我想要的是通过slimscroll滚动表体,而不是默认滚动条。
没有一个这样的工作 - 有人可以告诉我光吗?
谢谢:)
解决方案检查更新的JSFiddle: - JSFiddle
< table id =exampleclass =displaycellspacing =0width =100%>
....
< tbody id =slimtest1>
......
< / tbody>
< / table>
CSS
thead,tbody {display:block; }
tbody {
height:200px; / *对于演示* /
overflow-y:auto; / *垂直滚动* /
overflow-x:hidden; / *隐藏横向滚动* /
}
Im trying to do mix them. use a slimlcroll with jQuery DataTable (no pagination). So, I found these examples:
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 id="slimtest1"> <tbody> ... </tbody> </div>
http://jsfiddle.net/yossico/hxkvfs60/2/
I also try to slim scroll the tbody directly: 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. None of this worked - can someone please show me the light?
Thanks :)
解决方案Check the Updated JSFiddle :- JSFiddle
<table id="example" class="display" cellspacing="0" width="100%"> .... <tbody id="slimtest1"> ...... </tbody> </table>
CSS
thead, tbody { display: block; } tbody { height: 200px; /* For the demo */ overflow-y: auto; /* Vertical scroll */ overflow-x: hidden; /* Hide the horizontal scroll */ }
这篇关于Slimscroll和jQuery Datatable的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!