【发布时间】:2015-05-04 15:27:12
【问题描述】:
我有一个固定头数据表,向下滚动时前 4 行固定在顶部,问题是当我尝试使第二行 colspan=3 显示“让我 colspan=3”时,数据表丢失它能够固定在顶部。我不知道为什么这会影响数据表。谢谢您的帮助。 代码:http://jsfiddle.net/xF8hZ/139/
<table id="example" class="table table-striped table-bordered" cellspacing="0" width="100%">
<thead>
<tr>
<th colspan=3></th>
<th colspan=3>234</th>
</tr>
<tr>
<th>Make me </th>
<th>colspan</th>
<th>=3</th>
<th>
<p class="rotatehead">Hazmat</p>
</th>
<th>
<p class="rotatehead">Out of Area</p>
</th>
<th>
<p class="rotatehead">Lite</p>
</th>
</tr>
更新:我刚刚在添加 colspan=3 后看到了我的控制台,我收到了这个错误:
Uncaught TypeError: Cannot read property 'style' of undefinedjquery.dataTables.js:4138 _fnCalculateColumnWidthsjquery.dataTables.js:3265 _fnInitialisejquery.dataTables.js:6521 (anonymous function)jquery-1.8.3.js:611 jQuery.extend.eachjquery-1.8.3.js:241 jQuery.fn.jQuery.eachjquery.dataTables.js:6047 DataTablejquery.dataTables.js:14691 $.fn.DataTablepriceadjustment.html:30 (anonymous function)jquery-1.8.3.js:974 jQuery.Callbacks.firejquery-1.8.3.js:1084 jQuery.Callbacks.self.fireWithjquery-1.8.3.js:406 jQuery.extend.readyjquery-1.8.3.js:83 DOMContentLoaded
【问题讨论】:
标签: javascript jquery css datatable jquery-datatables