Skip to content

Commit 6faff88

Browse files
authored
Update README.md
1 parent 90baf21 commit 6faff88

File tree

1 file changed

+7
-7
lines changed

1 file changed

+7
-7
lines changed

README.md

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -90,13 +90,13 @@ var StickyState = require('sticky-state');
9090

9191

9292
var stickyOptions = {
93-
disabled: false,
94-
className: 'sticky',
95-
stateClassName: 'is-sticky',
96-
fixedClass: 'sticky-fixed',
97-
wrapperClass: 'sticky-wrap',
98-
wrapFixedSticky: true,
99-
absoluteClass: 'is-absolute',
93+
disabled: false, // disable or enable the sticky feature initially
94+
className: 'sticky', // the core class which should be equal to the css. see above.
95+
stateClassName: 'is-sticky', // the state class, when the element is actually sticky
96+
fixedClass: 'sticky-fixed', // the fallback class that uses position:fixed to make the element sticky
97+
wrapperClass: 'sticky-wrap', // the fallback (polyfilled) version needs a placeholder that uses the space of the actual sticky element when its position:fixed
98+
wrapFixedSticky: true, // by default the sticky element gets wrapped by the placeholder. if you set it to false it will be inserted right before it.
99+
absoluteClass: 'is-absolute', // the polyfilled sticky element needs to be position:absolut in some cases.
100100

101101
// scrollclass will add a class to the sticky element that is depending on the scroll direction when the element is sticky.
102102
// when the scrolling stops the class will be the value of "none" unless you set "persist" to true.

0 commit comments

Comments
 (0)