PHPackages                             belhard/floatthead - PHPackages - PHPackages  [Skip to content](#main-content)[PHPackages](/)[Directory](/)[Categories](/categories)[Trending](/trending)[Leaderboard](/leaderboard)[Changelog](/changelog)[Analyze](/analyze)[Collections](/collections)[Log in](/login)[Sign up](/register)

1. [Directory](/)
2. /
3. [Utility &amp; Helpers](/categories/utility)
4. /
5. belhard/floatthead

ActiveLibrary[Utility &amp; Helpers](/categories/utility)

belhard/floatthead
==================

Float the table header on scroll.

03.7k1JavaScript

Since Nov 1Pushed 6y ago1 watchersCompare

[ Source](https://github.com/BelHard/floatThead)[ Packagist](https://packagist.org/packages/belhard/floatthead)[ RSS](/packages/belhard-floatthead/feed)WikiDiscussions master Synced 1mo ago

READMEChangelogDependenciesVersions (1)Used By (1)

 [jquery.floatThead](https://github.com/mkoryak/floatThead/releases) [![](https://camo.githubusercontent.com/bb27d76da5f46c23dac219a69aa7ea40896a290f1f6e362b0657ae0274b603ce/687474703a2f2f696d672e626164676573697a652e696f2f68747470733a2f2f756e706b672e636f6d2f666c6f617474686561642f646973742f6a71756572792e666c6f617454686561642e6d696e2e6a733f636f6d7072657373696f6e3d677a6970267374796c653d666c61742d737175617265)](https://unpkg.com/floatthead/dist/jquery.floatThead.min.js) [![](https://camo.githubusercontent.com/ea72899359bca91647bab6a541739bfc904286ae32d60a6bc9a60d5b236e7d7a/68747470733a2f2f696d672e736869656c64732e696f2f6e706d2f762f666c6f617474686561642e7376673f7374796c653d666c61742d737175617265)](https://www.npmjs.com/package/floatthead) [![](https://camo.githubusercontent.com/be7f8a0e7807f2a4e90b454188428b489a55bf44aec66ffed5851b94cbd33019/68747470733a2f2f696d672e736869656c64732e696f2f6e706d2f6c2f666c6f617474686561642e7376673f7374796c653d666c61742d737175617265)](https://github.com/mkoryak/floatThead/blob/master/LICENSE)
=======================================================================================================================================================================================================================================================================================================================================================================================================================================================================================================================================================================================================================================================================================================================================================================================================================================================================================================================================================================================================================================================================

[](#----jqueryfloatthead------------)

[![woot](https://camo.githubusercontent.com/468b8497442fdf32ede3dc490203fbbba53f1d567498e79e28c6663ee8dbc477/687474703a2f2f6769616e742e6766796361742e636f6d2f416e79476c6f72696f7573416c706163612e676966 "or just click")](http://mkoryak.github.io/floatThead/)

Documentation &amp; Examples:
--------------------------------------------------------------------

[](#documentation--examples-httpmkoryakgithubiofloatthead)

Float the table header on scroll. No changes to your HTML/CSS are required, it just works. Supports floating the header while scrolling within the window or while scrolling within a container with overflow. Supports responsive tables.

### Install

[](#install)

#### Package managers

[](#package-managers)

```
npm install floatthead
bower install floatThead
```

#### Download code

[](#download-code)

[Latest Release (zip)](https://github.com/mkoryak/floatThead/archive/2.1.4.zip)

#### Via CDN

[](#via-cdn)

```

  $(() => $('table').floatThead());

```

#### For java people

[](#for-java-people)

[Webjar](https://github.com/webjars/floatThead)

### Wrappers

[](#wrappers)

[vuejs component](https://github.com/tmlee/vue-floatThead) by @tmlee

[angularjs directive](https://github.com/brandon-barker/angular-floatThead) by @brandon-barker

[yii2 framework wrapper](https://github.com/bluezed/yii2-floatThead) by @bluezed

Things this plugin does:
========================

[](#things-this-plugin-does)

---

- In prod @ big corporations and opensource projects. Maintained. See open issues.
- Works on tables within a scrollable container or whole window scrolling
- Works with responsive table wrappers
- Works with dynamically hidden/added/removed columns
- Does not clone the thead - so your events stay bound
- Does what `position:fixed` cannot do (and on browsers that do not support it)
- Does not mess with your styles, and doesnt require any css (see `fixed` vs `absolute` position modes)
- Works with border-collapse variants, weird margins, padding and borders
- Works with libs like [datatables](http://datatables.net), [perfect-scrollbar](http://mkoryak.github.io/floatThead/examples/perfect-scrollbar/), [bootstrap3](http://mkoryak.github.io/floatThead/examples/bootstrap3/), and many more
- Header can be floated with `position:absolute` which adds a wrapper, or `position:fixed` which does not. Both have their pros and cons. By default the best option is chosen based on your configuration

Things this plugin does NOT do:
===============================

[](#things-this-plugin-does-not-do)

---

- Does not float the footer
- Does not let you lock the first column like in excel
- **Safari and mobile safari are not supported**. It might work, or it [might not](https://github.com/mkoryak/floatThead/issues/108), depending on your markup and safari version.
- RTL is not really supported - it might work in overflow scrolling more, if you are lucky. Expects `dir` on `html` element.
- Layout issues resulting from document zoom not being 100% are not supported.

Common Pitfalls
---------------

[](#common-pitfalls)

If you use css and html best practices, this plugin will work. If you are stuck in 1999, you better [read the faq](http://mkoryak.github.io/floatThead/faq/).

How to get help with the floatThead
-----------------------------------

[](#how-to-get-help-with-the-floatthead)

All issues should be reported through github. [Coffee/Beer](https://ko-fi.com/floatthead) donations are welcome ;)

Requirements:
-------------

[](#requirements)

- jQuery 1.8.x or better (1.9 compliant) (or jQuery 1.7.x and jQuery UI core)

Supported Browsers:
-------------------

[](#supported-browsers)

- IE8 or better (**must read** [this for ANY Internet Exploder integrations](http://mkoryak.github.io/floatThead/examples/row-groups/))
- Chrome, Firefox (all versions from last 3 years)

Change Log
----------

[](#change-log)

[see CHANGELOG.md](https://github.com/mkoryak/floatThead/blob/master/CHANGELOG.md)

Who is using floatThead ?
-------------------------

[](#who-is-using-floatthead-)

### [Ctrl O](https://ctrlo.com)

[](#ctrl-o)

- Ctrl O provides simple and innovative products to help an organization's business processes. Linkspace, its flagship product, helps share information between teams and individuals, in a simple and effective manner.

### [WheresTheGig.com](https://WheresTheGig.com)

[](#wheresthegigcom)

- A free service for the musical community

### [Google](https://www.youtube.com/watch?v=dQw4w9WgXcQ)

[](#google)

- Internally, I happen to know...

### [Samsung](https://github.com/Samsung/iotjscode/blob/3d4de15ea32d27dce5885b2c8c9e3a783c846311/www/scripts/app/main.js#L234)

[](#samsung)

- For the internet of things!

### [compat-table](https://github.com/kangax/compat-table/)

[](#compat-table)

-
- [online site](http://kangax.github.io/compat-table/es6/) (see floatThead in action here)

### [Around 135,000 hits on github code search](https://github.com/search?q=floatThead&ref=reposearch&type=Code&utf8=%E2%9C%93)

[](#around-135000-hits-on-github-code-search)

License
-------

[](#license)

MIT

###  Health Score

25

—

LowBetter than 37% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity19

Limited adoption so far

Community22

Small or concentrated contributor base

Maturity35

Early-stage or recently created project

 Bus Factor1

Top contributor holds 89% of commits — single point of failure

How is this calculated?**Maintenance (25%)** — Last commit recency, latest release date, and issue-to-star ratio. Uses a 2-year decay window.

**Popularity (30%)** — Total and monthly downloads, GitHub stars, and forks. Logarithmic scaling prevents top-heavy scores.

**Community (15%)** — Contributors, dependents, forks, watchers, and maintainers. Measures real ecosystem engagement.

**Maturity (30%)** — Project age, version count, PHP version support, and release stability.

### Community

Maintainers

![](https://www.gravatar.com/avatar/6d46eec372620664574541ea54a3278872c687d2529c2b0aa91d8f6f677e5299?d=identicon)[n2ref](/maintainers/n2ref)

---

Top Contributors

[![mkoryak](https://avatars.githubusercontent.com/u/383817?v=4)](https://github.com/mkoryak "mkoryak (381 commits)")[![jurko-gospodnetic](https://avatars.githubusercontent.com/u/3112833?v=4)](https://github.com/jurko-gospodnetic "jurko-gospodnetic (5 commits)")[![n2ref](https://avatars.githubusercontent.com/u/5215787?v=4)](https://github.com/n2ref "n2ref (5 commits)")[![hornj](https://avatars.githubusercontent.com/u/5883827?v=4)](https://github.com/hornj "hornj (3 commits)")[![rgeerts](https://avatars.githubusercontent.com/u/1899907?v=4)](https://github.com/rgeerts "rgeerts (3 commits)")[![rshah88](https://avatars.githubusercontent.com/u/14062560?v=4)](https://github.com/rshah88 "rshah88 (3 commits)")[![adam187](https://avatars.githubusercontent.com/u/156628?v=4)](https://github.com/adam187 "adam187 (2 commits)")[![protron](https://avatars.githubusercontent.com/u/465963?v=4)](https://github.com/protron "protron (2 commits)")[![ithielnor](https://avatars.githubusercontent.com/u/3342620?v=4)](https://github.com/ithielnor "ithielnor (2 commits)")[![vperron](https://avatars.githubusercontent.com/u/88618?v=4)](https://github.com/vperron "vperron (2 commits)")[![JelteF](https://avatars.githubusercontent.com/u/1162278?v=4)](https://github.com/JelteF "JelteF (2 commits)")[![coliff](https://avatars.githubusercontent.com/u/1212885?v=4)](https://github.com/coliff "coliff (2 commits)")[![robinpoort](https://avatars.githubusercontent.com/u/4848082?v=4)](https://github.com/robinpoort "robinpoort (1 commits)")[![s1lver](https://avatars.githubusercontent.com/u/4567634?v=4)](https://github.com/s1lver "s1lver (1 commits)")[![selckin](https://avatars.githubusercontent.com/u/12945?v=4)](https://github.com/selckin "selckin (1 commits)")[![weekens](https://avatars.githubusercontent.com/u/790572?v=4)](https://github.com/weekens "weekens (1 commits)")[![XAOPT](https://avatars.githubusercontent.com/u/2543651?v=4)](https://github.com/XAOPT "XAOPT (1 commits)")[![ameily](https://avatars.githubusercontent.com/u/749571?v=4)](https://github.com/ameily "ameily (1 commits)")[![billsaysthis](https://avatars.githubusercontent.com/u/11235?v=4)](https://github.com/billsaysthis "billsaysthis (1 commits)")[![cantin](https://avatars.githubusercontent.com/u/1147234?v=4)](https://github.com/cantin "cantin (1 commits)")

### Embed Badge

![Health badge](/badges/belhard-floatthead/health.svg)

```
[![Health](https://phpackages.com/badges/belhard-floatthead/health.svg)](https://phpackages.com/packages/belhard-floatthead)
```

###  Alternatives

[chrismcmacken/phptools

Small utilities that assist in developing applications

253.6k](/packages/chrismcmacken-phptools)

PHPackages © 2026

[Directory](/)[Categories](/categories)[Trending](/trending)[Changelog](/changelog)[Analyze](/analyze)
