ye-sticky
v0.0.17
Published
Stick your target to parent container to fix it while scrolling
Downloads
30
Readme
#yeSticky Simple plugin to fix target position inside parent container while scrolling.
Usage:
let Sticky = require('ye-sticky);
Sticky
.create(tagretObjectSelector)
.setDefaultOffset(number)
.setStartPoint(number)
.setEndPoint(number)
.build();
#####Options: If you need to change default parameters, just pipe them between create and build methods.
- .setDefaultOffset(number) - target object offset from the parent's top. Default value = 0.
- .setStartPoint(number) - parents' top offset, where sticky action begins. Default value = 0.
- .setEndPoint(number) - parents' bottom offset, where sticky action stops. Default value = targetClientHeight + defaultOffset.