off canvas nav smooth scroll - Download Responsive Off-canvas Navigation With Smooth Scroll Integration

Download Responsive Off-canvas Navigation With Smooth Scroll Integration

Posted on

This time I will share jQuery Plugin and tutorial about Responsive Off-canvas Navigation With Smooth Scroll Integration, hope it will help you in programming stack.

off canvas nav smooth scroll - Download Responsive Off-canvas Navigation With Smooth Scroll Integration
File Size: 3.09 KB
Views Total: 2061
Last Update:
Publish Date:
Official Website: Go to website
License: MIT
   

A sticky, responsive, mobile-friendly navigation system for your cross-platform web app which turns the regular navbar into an off-canvas side menu with a hamburger toggle button on the mobile device.

It also comes with a basic smooth scroll functionality that enables the user to smoothly scroll through your web app by clicking/tapping the menu items.

How to use it:

1. To get started, import the navMain.css and nav.js into the document.

1 <link rel="stylesheet" href="/path/to/navMain.css">
2 <script src="/path/to/jquery.min.js"></script>
3 <script src="/path/to/nav.js"></script>

2. Create a navbar containing the logo, hamburger toggle button, and anchor links pointing to the page sections within the document.

01 <nav class="navbar">
02   <div class="logo">
03     <h4>jQueryScript</h4>
04   </div>
05   <ul class="navlinks">
06       <li><a href="#section1" class="scroll">Home</a></li>
07       <li><a href="#section2" class="scroll">About</a></li>
08       <li><a href="#section3" class="scroll">Contact</a></li>
09   </ul>
10   <div class = "navdropdown">
11       <div class="line1"></div>
12       <div class="line2"></div>
13       <div class="line3"></div>
14   </div>
15 </nav>

3. Add unique IDs to page sections as follows. That’s it.

1 <div class="content" id="section1">
2   Home
3 </div>
4 <div class="content" id="section2">
5   About
6 </div>
7 <div class="content" id="section3">
8   Contact
9 </div>

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

source : jquery.net