Skip to content

Latest commit

 

History

History
29 lines (20 loc) · 929 Bytes

README.md

File metadata and controls

29 lines (20 loc) · 929 Bytes

iscroll-sticky

Sticky headers for iScroll 5. Inspired by iscroll-stickyheader for iScroll 4.

Installation

bower install iscroll-sticky

The repository provides a prebuilt version.

Usage

Note: This plugin depends on iscroll-probe.js, as special kind of iScroll 5 build.

Set your IScroll HTML up as usual. Then set the probeType in the IScroll contructor and instantiate the sticky header with the iScrollSticky constructor. For example:

var scroll = new IScroll('#scroll', { probeType: 3 });
new IScrollSticky(scroll, 'h1');

In this example, the scrolling wrapper element has the id scroll and the sticky headers are h1 tags. You can use any CSS3 selector in IScrollSticky constructor as its second argument.

Contributing

See Contributing

Release History

See Changelog

License

MIT