Month: March 2018

Smooth scrolling to elements with JavaScript (no jQuery)

Smooth scrolling to elements with JavaScript (no jQuery)

Here’s a quick snippet of JavaScript to scroll to elements on your webpage smoothly. This example is in vanilla JavaScript and does not require jQuery to work correctly. Let’s say you have a page with similar markup to the snippet below.

When a user clicks your links, you would […]