0.2.2 • Published 4 years ago

simple-sticky-table-header v0.2.2

Weekly downloads
17
License
MIT
Repository
github
Last release
4 years ago

Simple Sticky Table Header

Simple Sticky Table Header plugin. Vanilla JS.

Usage

    // Simple table:
    const table = document.getElementById('table');
    stickyHeader(table);

    // With scroll parent:
    const parent = document.getElementById('main');
    [].forEach.call(parent.querySelectorAll('table'), (el) => {
      stickyHeader(el, {scrollParent: parent})
    });

Params

table

Table element.

Options

Object with options.

scrollParent

Scroll parent element. Optional, document.body is default.

mode

Sticky table mode, can be applied as horizontal or vertical (left columns sticked) or for both. Vertical sticky column applicable only to first N columns with cells as <th> in tbody. Possible modes are 'horizontal', 'vertical', 'both'. Default: 'horizontal'.

noWrapper

Don't wrap table in extra element. If TRUE it will use existing one. Default: false

horizontalAddHeight

Additional height for horizontal sticky table wrapper. In example needed if you have some border in thead. Default: 0

0.2.2

4 years ago

0.2.1

4 years ago

0.2.0

5 years ago

0.1.11

5 years ago

0.1.10

5 years ago

0.1.9

5 years ago

0.1.8

5 years ago

0.1.7

5 years ago

0.1.6

6 years ago

0.1.5

6 years ago

0.1.4

6 years ago

0.1.3

6 years ago

0.1.2

6 years ago

0.1.1

6 years ago

0.1.0

6 years ago

0.0.9

6 years ago

0.0.8

6 years ago

0.0.7

6 years ago

0.0.6

6 years ago

0.0.5

6 years ago

0.0.4

6 years ago

0.0.3

6 years ago

0.0.2

6 years ago

0.0.1

6 years ago