2.2.1 • Published 10 years ago
stickyelements v2.2.1
Sticky Elements
Everything can stick. Just because.
Getting started
npm install stickyelements and insert dist/stickyelements-animate.js (or build your own bundle using src files)
Then, stick elements!
stickyElements('.item', {
stickiness: 5,
duration: 450
});Arguments
CSS selector
- Elements that will stick to your mouse
Options
stickinessInteger, Object: How long elements remain stick to your mouse. If integer, apply samexandyvalues. If object, can containxand/orykey. Integer between 0 and 10. (Default:3)durationInteger: Duration in milliseconds of animation (using animateplus. (Default:450)pointerBoolean: Enable Pointer Events instead of Mouse Events. Elements will stick to mouse, touch and all input types (Default:false). Need PEP polyfill andtouch-actionattribute on each elements (follow PEP polyfill instructions).