Responsive Sliding Sidebar Navigation Plugin jQuery crbnMenu - Download Responsive Sliding Sidebar Navigation Plugin With jQuery - crbnMenu

Download Responsive Sliding Sidebar Navigation Plugin With jQuery – crbnMenu

Posted on

This time I will share jQuery Plugin and tutorial about Responsive Sliding Sidebar Navigation Plugin With jQuery – crbnMenu, hope it will help you in programming stack.

File Size: 8.8 KB
Views Total: 10625
Last Update:
Publish Date:
Official Website: Go to website
License: MIT
   

crbnMenu is a lightweight jQuery plugin for creating an accordion-style collapsible sidebar navigation with sub menus on your webpage. The plugin also has the ability to collapse the sidebar navigation into a hamburger toggle nav menu for better user experience on mobile devices.

View more:

How to use it:

1. Load Font Awesome Iconic Font (OPTIONAL) and the jQuery crbnMenu plugin’s main CSS file in the head section of the html document.

1 <link rel="stylesheet" href="font-awesome.min.css">
2 <link rel="stylesheet" href="styles.css">

2. Create the sidebar navigation from nested html lists as this:

01 <div class="menu-container">
02   <div class="crbnMenu">
03     <div class="link-stack">
04       <span class="brand">CRBNMenu v.1</span>
05       <a id="nav-toggle" class="nav-toggle">
06         <span></span>
07       </a>
08     </div>
09     <ul class="menu">
10       <li>
11         <a class="nav-link" href="#">
12           <span>Link 1</span>
13           <span class="menu-toggle"><i class="fa fa-angle-down" aria-hidden="true"></i></span>
14         </a>
15         <ul>
16           <li>
17               <a href="#">Submenu 1_1</a>
18           </li>
19           <li>
20               <a href="#">Submenu 1_2</a>
21           </li>
22           <li>
23               <a href="#">Submenu 1_3</a>
24           </li>
25           </li>
26         </ul>
27       </li>
28         <li>
29           <a class="nav-link" href="#">
30             <span>Link 2</span>
31             <span class="menu-toggle"><i class="fa fa-angle-down" aria-hidden="true"></i></span>
32           </a>
33           <ul>
34             <li>
35               <a href="#">Submenu 2_1</a>
36             </li>
37             <li>
38               <a href="#">Submenu 2_2</a>
39             </li>
40             <li>
41               <a href="#">Submenu 2_3</a>
42             </li>
43           </ul>
44         </li>
45     </ul>
46   </div>
47   <div class="content">
48     Main Content Here
49   </div>
50 </div>

3. Load jQuery library and the jQuery crbnMenu plugin’s script at the end of the document.

1 <script src="//code.jquery.com/jquery.min.js"></script>
2 <script src="crbnMenu.js"></script>

4. Initialize the sidebar navigation and done.

1 $('.menu').crbnMenu();

5. Decide whether or not to hide the active menu.

1 $('.menu').crbnMenu({
2   hideActive: true
3 });

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

source : jqueryscript.net