2009年最受欢迎jQuery插件—Chromatabler【表格】
作者:rainweb 日期:2010-01-28
jQuery 是个宝库,而 jQuery 的插件体系是个取之不竭的宝库,众多开发者在 jQuery 框架下,设计了数不清的插件,jQuery 的特长是网页效果,因此,它的插件库也多与 UI 有关。 webdesignledger.com 网站推选了2009年度最佳 jQuery 插件,有些插件在本博客中已经有介绍,有些还没有,本文介绍的是:2009年最受欢迎jQuery插件—Chromatabler【表格】
表格
一看Chromatabler,汗~~没见过这个单词啊,一查还真没有,但就是效果来看,就是表格的表头固定,内容滚动。这样可以再有限的空间内显示更多的内容,但就实用性或者没关角度,没有tab选项卡实用,一般用在统计显示中,这样一个页面可以显示多个表格了。
使用说明
1、首先还是导入JS、CSS文件
2、设置表格的宽度和高度
XML/HTML代码
- <script>
- $("#yourTableID2").chromatable({
- width: "900px",
- height: "400px",
- scrolling: "yes"
- });
- </script>
3、很简单,最后就是html表格代码
XML/HTML代码
- <table id="yourTableID2" width="100%" border="0" cellspacing="0" cellpadding="0">
- <thead>
- <tr>
- <th>Check out this header</th>
- <th>Look here's another one</th>
- <th>Wow, look at me!</th>
- </tr>
- </thead>
- <tbody>
- <tr>
- <td>Quisque in wisi quis orci tincidunt fermentum</td>
- <td>Mauris aliquet mattis metus</td>
- <td>Etiam eu ante non leo egestas nonummy</td>
- </tr>
- <tr>
- <td>Quisque in wisi quis orci tincidunt fermentum</td>
- <td>Mauris aliquet mattis metus</td>
- <td>Etiam eu ante non leo egestas nonummy</td>
- </tr>
- <tr>
- <td>Some content goes in here</td>
- <td>Praesent vitae ligula nec orci pretium vestibulum</td>
- <td>Maecenas tempus dictum libero</td>
- </tr>
- <tr>
- <td>Quisque in wisi quis orci tincidunt fermentum</td>
- <td>Mauris aliquet mattis metus</td>
- <td>Etiam eu ante non leo egestas nonummy</td>
- </tr>
- </tbody>
- </table>
PS:用了大半年了才发现FCK可以直接贴html高亮代码,以前全是直接贴近来的太丑了,我说人家帖的代码都那么整齐,BS自己一回。
评论: 0 | 引用: 0 | 查看次数: -
发表评论

上一篇
下一篇

文章来自:
Tags:
相关日志: