# scrollnav **Repository Path**: GitHubFork/scrollnav ## Basic Information - **Project Name**: scrollnav - **Description**: Fork自https://github.com/jimmynotjim/scrollNav.git - **Primary Language**: JavaScript - **License**: Apache-2.0 - **Default Branch**: master - **Homepage**: None - **GVP Project**: No ## Statistics - **Stars**: 0 - **Forks**: 0 - **Created**: 2020-01-16 - **Last Updated**: 2020-12-19 ## Categories & Tags **Categories**: Uncategorized **Tags**: None ## README [![build status](https://secure.travis-ci.org/jimmynotjim/scrollNav.png?branch=master)](http://travis-ci.org/jimmynotjim/scrollNav.js) # [jQuery scrollNav][1] A jQuery plugin for building a scrolling side navigation menu ## Getting Started Install with Bower `bower install scrollNav` Or download the latest [zipped package][zip]. [zip]: https://github.com/jimmynotjim/scrollNav/archive/master.zip ## Examples Check out [the homepage][1] to see it in action. ## Features * ### Simple to set up With a single file import and function in your footer, you're on your way. * ### Fully customizable Very little styling is set for you, but the bit that is, is fully customizable. * ### Tiny Size At 1.5kb min'd and GZip'd, scrollNav is pretty unintrusive. If you use Ajax to import and initiate it, it's almost negligable. ## Requirements * For in-page usage [jQuery 1.8.0][16] or greater and [html5shiv][17]/[modernizr][18] for older browser support * To build source [Node 0.10.0][19] or greater and [grunt 0.4.0][20] or greater ## Usage ### Import Start by importing the script to your page, the best location is in the footer, but no matter what, make sure it follows your jQuery file. ```html ``` ### Build your page Include a class or id hook on the element you want to apply the plugin to and include an `

` for each section you want to inlcude in the navigation. ```html

This is the main heading for the article

This is a sub-heading for the article

Yada yada yada...

This is a section heading

More yada yada...

Another section heading

More more yada...

``` ### Initialize Now initialize the plugin with your hook for the article ``` $('.post__article').scrollNav(); ``` and the plugin scans the article, grabs all the `

`s, adds them to the navigation list and inserts the list before the article. It's that easy...well almost. ### Styling To keep the plugin simple there are no styles added to the navigation, that's all up to you. The nav structure looks like this and includes class names in the [BEM Methodology][3] style (for a good overview read [MindBEMding - getting your head 'round BEM syntax][4]): ```html