Smooth Anchor Page Scrolling Effect with Pure JavaScript – scrollToAnchor

Category: Image , Javascript | November 5, 2015
Author: Paul-Browne
Views Total: 3,329 views
Official Page: Go to website
Last Update: November 5, 2015
License: MIT

Preview:

Smooth Anchor Page Scrolling Effect with Pure JavaScript – scrollToAnchor

Description:

scrollToAnchor is an extremely lightweight (~1kb) which enables anchor links to smoothly scroll to desired point within the document.

Basic usage:

Add the scrollToAnchor.js JavaScript library to your web page.

<script src="scrollToAnchor.min.js"></script>

Create anchor links and destination content as follow.

<a id="sect-1" href="#sect1">section 1</a>

<h1 id="sect1">
  Section 1
</h1>

That’s it.

You Might Be Interested In:


Leave a Reply