Usage
Add HTML id attribute to element you want to scroll to.
Example:
`
Header we will be drawn to smoothly!
Now add hash to href attribute and class
sl-animated-scroll` to an A tag or element containing A tag.
Example:
<a href="#your-anchor" class="sl-animated-scroll"> Get me smoothly to my anchor! </a>
Try it.
How to hook menu / nav links?
- Go to Appearance -> Menus.
- Make sure you have enabled classes in Screen Options (top right corner).
- Create new Custom Link
- Add your anchor in URL of the custom link:
/#your-anchor
- Insert special class to the custom link:
sl-animated-scroll
- Save and try it!