# | First Name | Last Name | Username |
---|---|---|---|
1 | Mark | Otto | @mdo |
2 | Jacob | Thornton | @fat |
3 | Larry the Bird |
<script src="libs/jquery.js"></script> <script src="libs/store.js"></script> <script src="jquery.resizableColumns.js"></script> <table class="table table-bordered" data-resizable-columns-id="demo-table"> <thead> <tr> <th data-resizable-column-id="#">#</th> <th data-resizable-column-id="first_name">First Name</th> <th data-resizable-column-id="last_name">Last Name</th> <th data-resizable-column-id="username" data-noresize>Username</th> </tr> </thead> <tbody> ... </tbody> </table> <script> $(function(){ $("table").resizableColumns({ store: store }); }); </script>
适用浏览器:FireFox、Chrome、Safari、Opera、傲游、搜狗. 不支持IE8、360、世界之窗。
代码整理:站长图库