We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 849cb6d commit 7d66d8eCopy full SHA for 7d66d8e
src/index.js
@@ -1,3 +1,7 @@
1
+/**
2
+ * Smooth scrolling onClick event handler
3
+ * @param {string} selector argument will be passed to `querySelector`, usually an HTML id
4
+ */
5
const scrollTo = (selector) => {
6
document.querySelector(selector).scrollIntoView({
7
behavior: 'smooth',
0 commit comments