Skip to content
JQuery plugin to fix table header on top when windows scroll hide the head
Branch: master
Clone or download
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Permalink
Type Name Latest commit message Commit time
Failed to load latest commit information.
demo
dest
.gitignore
README.md
gulpfile.js
jquery.tableheadfixer.js
package-lock.json
package.json

README.md

tableheadfixer

JQuery plugin to fix table header on top when windows scroll hide the head

Install it via npm

npm i tableheadfixer

Use

require('tableheadfixer');

if (typeof $ === "function") {//If jQuery load?     
    if (typeof $.fn.tableHeadFixer === "function") {
        //If table-fixed-header load?
        var container = $(this.$el).find(".page-content");
        $(el).tableHeadFixer({
        container: container,
        beforeTransform: function(val) {
            let th = page.find("thead");
            if (!th.length || val == 0) return val;

            if (!header.hasClass("navbar-hidden")) {
            return val + header.height();
            }
            return val;
        }
        });
    }
}
You can’t perform that action at this time.
You signed in with another tab or window. Reload to refresh your session. You signed out in another tab or window. Reload to refresh your session.