peterudo / iscroll-stickyheaders

iScroll plugin that adds support for sticky headers
http://rudolfrck.github.com/iscroll-stickyheaders/
41 stars 6 forks source link

Added functionality to add an offset from the top #9

Open maximilianschmidt opened 9 years ago

maximilianschmidt commented 9 years ago

If you don’t want the header to be sticky at the very top, you can add an offset to it.

scroll.enableStickyHeaders('h1', offset);

for example:

scroll.enableStickyHeaders('h1', 300); for 300px offset from the top.