Skip to content

Instantly share code, notes, and snippets.

View felipenmoura's full-sized avatar
🏠
Keeping safe

Felipe Nascimento de Moura felipenmoura

🏠
Keeping safe
View GitHub Profile
@felipenmoura
felipenmoura / animatedScrollTo.js
Last active November 30, 2022 10:01 — forked from joshbeckman/animatedScrollTo.js
ScrollTo animation using pure javascript and no jquery
/**
* Will gracefuly scroll the page
* This function will scroll the page using
* an `ease-in-out` effect.
*
* You can use it to scroll to a given element, as well.
* To do so, pass the element instead of a number as the position.
* Optionally, you can pass a `queryString` for an element selector.
*
* The default duration is half a second (500ms)