Skip to content

Instantly share code, notes, and snippets.

@sdtsui
Created March 7, 2016 23:24
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save sdtsui/88e3b29b541ea47f2687 to your computer and use it in GitHub Desktop.
Save sdtsui/88e3b29b541ea47f2687 to your computer and use it in GitHub Desktop.
Smooth Scroll Usage Example
//spike code
import smoothScroll from 'smooth-scroll/dist/js/smooth-scroll';
function goTo(href, offset) {
console.log("goTo:", href, offset);
smoothScroll.animateScroll(href, null, { updateURL: false, offset: offset || 0 })
}
window.goTo = goTo;
console.log('goTo assigned: ', goTo);
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment