相当有用的Table Row And Col Fix方法。
2012-01-10 22:29
155 查看
JQuery.FixedTable
jQuery.FixedTable is a jQuery plugin to create a fixed header and columns on a HTML table. The idea is from https://www.open2space.com/projects/fixedtable. We have improved it, and fixed some bugs.Feature
Allow horizontal and vertical scroll.Support multiple HTML tables in one page.
The number of fixed columns can be customize.
The background colors of each row when mouse is over and out can be customized.
Files
Demo , Download: Source Code
Usage
To make a fixed table, you need to some javascript code and a <table> with the <thead> and <tfoot> in your page, and set the elements' class.e.g.
<script type="text/javascript" src="jquery.js"></script> <script type="text/javascript" src="jquery.fixedtable.js"></script> <script type="text/javascript"> // this "tableDiv" must be the table's class $(".tableDiv").each(function() { var Id = $(this).get(0).id; var maintbheight = 555; var maintbwidth = 911; $("#" + Id + " .FixedTables").fixedTable({ width: maintbwidth, height: maintbheight, fixedColumns: 1, // header style classHeader: "fixedHead", // footer style classFooter: "fixedFoot", // fixed column on the left classColumn: "fixedColumn", // the width of fixed column on the left fixedColumnWidth: 150, // table's parent div's id outerId: Id, // tds' in content area default background color Contentbackcolor: "#FFFFFF", // tds' in content area background color while hover. Contenthovercolor: "#99CCFF", // tds' in fixed column default background color fixedColumnbackcolor:"#187BAF", // tds' in fixed column background color while hover. fixedColumnhovercolor:"#99CCFF" }); }); </script>
<div id="tableDiv_Arrays" class="tableDiv"> <table id="Open_Text_Arrays" class="FixedTables"> <thead> <tr> <th> Purpose </th> <th> C# </th> <th> Php4 <th> <th> Php5 </th> <th> ActionScript </th> <th> JavaScript </th> <th> Ruby </th> </tr> <thead> <tbody> <tr> <th> data1 </th> <th> data2 </th> <th> data3 <th> <th> data4 </th> <th> data5 </th> <th> data6 </th> <th> data7 </th> </tr> </tbody> <tfoot> <tr> <th> Purpose </th> <th> C# </th> <th> Php4 <th> <th> Php5 </th> <th> ActionScript </th> <th> JavaScript </th> <th> Ruby </th> </tr> </tfoot> </table> </div>
note: if you do not need the footer, just remove the <tfoot> in your html code.
相关文章推荐
- Table ‘xxx’ is marked as crashed and should be repaired 错误解决方法参考
- Cxgrid获取当前焦点的Row、Col 方法
- "The connection to adb is down, and a severe error has occured."亲测有用的方法
- mysql 出现表损坏解决方法:table 'xxx' is marked as crashed and should be repaired
- 33.Android热修复技术:AndFix的使用方法
- 简单方法Table xxx is marked as crashed and should
- Table '**' is marked as crashed and should be repaired的解决方法
- HtmlTableRowCollection.GetEnumerator 方法的C#例子
- TableRowCollection.GetEnumerator 方法的C#例子
- Easyui Datagrid扩展fixRownumber方法 转载
- Easyui Datagrid扩展fixRownumber方法
- Oracle Trigger :Before,after,each row and table level triggers ORA-04082 ORA-04084
- 关于Table 'xxx' is marked as crashed and should be repaired的修改方法
- TableView的accessoryButtonTappedForRow方法执行的时机
- Table ‘xxx’ is marked as crashed and should be repaired 错误解决方法参考
- TableView的accessoryButtonTappedForRow方法执行的时机
- TableView的accessoryButtonTappedForRow方法执行的时机
- Before, after, each row and table level triggers [Oracle]
- 语言测试是招聘嵌入式系统程序员过程中必须而且有效的方法。这些年,我既参加也组织了许多这种测试,在这过程中我意识到这些测试能为面试者和被面试者提供许多有用信息,此外,撇开面试的压力不谈,这种测试也是相当
- configure: error: Please fix the library issues listed above and try again错误解决方法