CairoCoder CairoCoder - 7 days ago 7
jQuery Question

HTML Table with multiple fixed rows

I am trying to freeze first top three rows of my table while scrolling down.

Here's my code:

<table>
<thead>
<tr>
<th>Item#</th>
<td>12766</td>
</tr>
<tr>
<th>LOC</th>
<td>OWH</td>
</tr>
<tr>
<th>Size/Qty</th>
<td>12</td>
</tr>
</thead>
<tbody>
<tr>
<th>SAlES</th>
<td>32132</td>
</tr>
<tr>
<th>SAlES</th>
<td>32132</td>
</tr>
<tr>
<th>SAlES</th>
<td>32132</td>
</tr>
</tbody>
</table>


I searched for many jQuery plugins, but they don't support multiple rows freezing.

Please advise.

Answer

This plugin was useful, just as @CBroe mentiond, I have to put rows into thead first, then I used this plugin:

http://mkoryak.github.io/floatThead/#usage

Comments