Skip to content

katerlouis/iscroll-sticky

 
 

Repository files navigation

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

About

iOS-style sticky headers for iScroll 5

Resources

License

Stars

Watchers

Forks

Packages

No packages published