From ad69fbff7ae08ebc62948c765d81757ce2d4fe58 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Stefan=20Feje=C5=A1?= Date: Fri, 2 Mar 2018 17:23:09 +0100 Subject: [PATCH] update smoothScroll, ES6 fix --- snippets/smoothScroll.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/snippets/smoothScroll.md b/snippets/smoothScroll.md index 0e3d3aa94..9165715d2 100644 --- a/snippets/smoothScroll.md +++ b/snippets/smoothScroll.md @@ -5,7 +5,7 @@ Smoothly scrolls the element on which it's called into the visible area of the b Use `.scrollIntoView` method to scroll the element. Pass `{ behavior: 'smooth' }` to `.scrollIntoView` so it scrolls smoothly. ```js -const smoothScroll = (element) => +const smoothScroll = element => document.querySelector(element).scrollIntoView({ behavior: 'smooth' });