This is a simple sidebar navigation plug in. Useful for navigating long text documents. It will scroll with your document to help you locate where you are. Any sub navigation is handled by expanding any nested lists one that point in the document is reached. Much like the bootstrap scroll spy.
Css class names can be amended and further notes can be found in the scroller.js file. Enjoy.
##Instructions.
- Drop the scroller.js file into your file structure/ html or embed.
- Do the same with styles.css
- Change default css classes in the settings in scroller.js if needed. The example shows how the markup should be laid out.
- Uncomment '// console.log(getLocation(settings.menuIdentifier));'' and look in the console to get your startHeight. Or enter manually for a smooth transition to the fixed position on scrolling down the page.
Please Fork/ Contribute
- Get settings.startheight to be set up automatically
- Tidy code/ review code comments
- Come up with a better name
###Licence
####The MIT License (MIT) The MIT License (MIT)
Copyright (c) 2013
Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:
The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.