Scroll Spy / Expander

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.

  1. Drop the scroller.js file into your file structure/ html or embed.
  2. Do the same with styles.css
  3. Change default css classes in the settings in scroller.js if needed. The example shows how the markup should be laid out.
  4. 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

TO DO

  1. Get settings.startheight to be set up automatically
  2. Tidy code/ review code comments
  3. 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.