The compiled, production ready plugin is available in the /dist
directory.
Only use the code in the /src
directory if you plan to compile the plugin from
source as part of your project’s build process.
_Building from source assumes an intermediate level of knowledge about build tooling. If you have trouble compiling the plugin on your own please use the provided compiled files or seek help from [Stack Overflow](https://stackoverflow.com/search?tab=newest&q=scrollnav.js)_
Include directly
Include the minified Universal Module Definition (UMD) files as a script tag to register scrollnav as a global variable.
Manual
<script src="[your assets directory]/scrollnav.min.umd.js"></script>
CDN
If you want to leverage the speed and distribution of a CDN scrollnav is available on unpkg and jsdelivr. The URL is pinned to v3.0.1 so you’ll need to update the script tag whenever a new version is released.
<script src="https://unpkg.com/scrollnav@3.0.1/dist/scrollnav.min.umd.js"></script>
Package manager
Install with Yarn
yarn add scrollnav
Install with NPM
npm install scrollnav
Install with Bower
bower install scrollnav --save
_The folks from Bower no longer recommend using Bower. Luckily they've created [a guide to migrating to Yarn](https://bower.io/blog/2017/how-to-migrate-away-from-bower/)._