Scrollspy vanilla JavaScript without a library or external frameworks Scrolling script Indicates which sections of content are viewing by updating navigation link styles in page scrolling.
JQuery to Beautifully Scroll Between Sections | pageScroll.js
How to make use of it:
1. Create anchor links pointing to content sections throughout the doc.
<nav class="scrollspy-nav"> <a class="scrollspy-link" data-target="home">Home</a> <a class="scrollspy-link" data-target="about">About</a> <a class="scrollspy-link" data-target="services">Services</a> <a class="scrollspy-link" data-target="blog">blog</a> <a class="scrollspy-link" data-target="contact">Contact</a> <span class="scrollspy-indicator"></span> </nav> <section class="scrollspy-section" id="home">Home</section> <section class="scrollspy-section" id="about">About</section> <section class="scrollspy-section" id="services">Services</section> <section class="scrollspy-section" id="blog">Blog</section> <section class="scrollspy-section" id="contact">Contact</section>
2. Place the JavaScript file scrollspy.min.js
on the bottom of the doc.
<script src="scrollspy.min.js"></script>
3. Highlight the energetic nav link utilizing your individual.
.scrollspy-nav .scrollspy-indicator { position: absolute; height: 3px; width: 0; background: red; bottom: 0; left: 0; transition: width 0.3s, left 0.1s; }
Minimalist Scrollspy Implementation, scrollspy Plugin/Github
See Demo And Download
Official Website(aashishpanthi): Click Here
This superior jQuery/javascript plugin is developed by aashishpanthi. For extra advanced usage, please go to the official website.