jQuery Based Sticky Navigation with Smooth Scroll Support stickynav - Download jQuery Based Sticky Navigation with Smooth Scroll Support - stickynav

Download jQuery Based Sticky Navigation with Smooth Scroll Support – stickynav

Posted on

This time I will share jQuery Plugin and tutorial about jQuery Based Sticky Navigation with Smooth Scroll Support – stickynav, hope it will help you in programming stack.

jQuery Based Sticky Navigation with Smooth Scroll Support stickynav - Download jQuery Based Sticky Navigation with Smooth Scroll Support - stickynav
File Size: 3.5 KB
Views Total: 4012
Last Update:
Publish Date:
Official Website: Go to website
License: MIT
   

Just another jQuery sticky navigation plugin that features smooth scroll and smart anchor link highlighting.

Features:

  • Stick your navigation to the top of the browser window.
  • Smoothly scroll to specified content section as you click on anchor links.
  • Auto highlight anchor links based on scroll position.

How to use it:

1. Download the jQuery stickynav plugin and place the stickynav.js script after jQuery JavaScript library.

1 <script src="/path/to/jquery.min.js"></script>
2 <script src="/path/to/stickynav.js"></script>

2. Create a site navigation with anchor links pointing to the content sections of your web page.

01 <div id="container">
02   <nav id="nav">
03     <ul>
04       <li><a id="nav_section1" class="active" href="#section_1">Section 1</a></li>
05       <li><a id="nav_section2" href="#section_2">Section 2</a></li>
06       <li><a id="nav_section3" href="#section_3">Section 3</a></li>
07       <li><a id="nav_section4" href="#section_4">Section 4</a></li>
08     </ul>
09   </nav>
10   <div class="section" id="section_1" style="color: #333333">
11     <h1>Section 1</h1>
12   </div>
13   <div class="section" id="section_2" style="color: #474747">
14     <h1>Section 2</h1>
15   </div>
16   <div class="section" id="section_3" style="color: #848484">
17     <h1>Section 3</h1>
18   </div>
19   <div class="section" id="section_4" style="color: #c1c1c1">
20     <h1>Section 4</h1>
21   </div>
22 </div>

3. Make the site navigation sticky at the top of the web page.

1 .sticky {
2   position: fixed;
3   z-index: 100;
4 }

This awesome jQuery plugin is developed by alexandraestrada. For more Advanced Usages, please check the demo page or visit the official website.

source : jqueryscript.net