fixed-thead

fixed-thead is a simple library that fix the thead when window is scrolled.

Usage no npm install needed!

<script type="module">
  import fixedThead from 'https://cdn.skypack.dev/fixed-thead';
</script>

README

fixed-thead

npm version Build Status

fixed-thead is a simple library that fix the thead when window is scrolled.

Installation

  • npm: npm install --save fixed-thead

How to use

// basis
var fixedThead = new FixedThead('table');

// option
fixedThead = new FixedThead('table', {
  offsetLeft: 0, // px only(default is 0)
  offsetTop: 50, // px only(default is 0)
  enabled: false // boolean(default is true)
  zIndex: 1234 // integer(default is 9999)
});

// property
fixedThead.enabled = false; // true or false