sticky icon indicating copy to clipboard operation
sticky copied to clipboard

Make sticky works with table headers

Open PVGrad opened this issue 8 years ago • 3 comments

This patch is for proper positioning table header on sticky state (position: fixed) Please take into concideration that you should apply sticky like this:

HTML:

<table>
    <thead>
        <tr class="sticky">
            <th>Id</th>
            <th>Name</th>
            <th>Value</th>
        </tr>
    </thead>
    <tbody>
        <tr>
            <td>1</td>
            <td>Test</td>
            <td>1</td>
        </tr>
    </tbody>
</table>

JS: $('.sticky').sticky();

PVGrad avatar Sep 27 '16 13:09 PVGrad

up

desfero avatar Jan 11 '17 08:01 desfero

Hi I'm currently using this code here(table.zip) to create a table from an XML file. I added the class to the

tag inside the as you suggested but it seems the sticky still doesn't work for some reason. Any idea why this is happening?

Here's the HTML code:

<div id="tableContainer">
        <table id="pruebatabla" class="fht-table"> </table>
</div>

Oz-Hershco avatar Jul 23 '18 08:07 Oz-Hershco

otherwise image

zhangshenhua avatar Nov 27 '18 09:11 zhangshenhua