@emeritus-tech/stickynav
v1.0.0
Published
Stickynav by scroll position
Downloads
5
Readme
Stickynav
Instructions
- Install dependencies -
yarn
- Start the server -
yarn start
to see a live example - Build the library -
yarn build
distribution files are stored on the root for access facility - Enjoy!
Usage
In browsers
<script>
new stickynav({
{
scrollThreshold: 300,
elementClass: 'this-is-sticky',
desktopPosition: 'top',
mobilePosition: 'bottom'
}
});
</script>
In node environments
Install
yarn add emeritus-tech/stickynav
Import
js:
import Stickynav from 'stickynav';
let stickynav = new Stickynav({
{
scrollThreshold: 300,
elementClass: 'this-is-sticky',
desktopPosition: 'top',
mobilePosition: 'bottom'
}
});
scss:
import '~stickynav/stickynav';