Skip to content
This repository has been archived by the owner on Sep 11, 2022. It is now read-only.

Make sticky works with table headers #234

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

PVGrad
Copy link
Contributor

@PVGrad PVGrad commented Sep 27, 2016

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();

This patch is for proper positioning table header on sticky state (position: fixed)
@desfero
Copy link

desfero commented Jan 11, 2017

up

@Oz-Hershco
Copy link

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>

@zhangshenhua
Copy link

otherwise
image

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants