bootstrap-vertical-menu is the use of jQuery framework and Bootstrap 3 to create a vertical sidebar menu that expands to a full navigation menu on mouseover and collapses on mouse leave.
jquery sidebar expand collapse, jquery sidebar menu with submenu, left sidebar menu in jquery, jquery dynamic sidebar menu, collapsible sidebar jquery
How to make use of it:
1. Load the latest jQuery library and Bootstrap stylesheet on the webpage.
<link rel="stylesheet" href="bootstrap.min.css"> <script src="//code.jquery.com/jquery-1.11.3.min.js"></script>
2. Load the bootstrap-vertical-menu.css
stylesheet in the header section to learn about the basic styles for the vertical sidebar menu.
<link rel="stylesheet" href="bootstrap-vertical-menu.css">
3. Create a sidebar menu navigation.
<nav class="navbar navbar-vertical-left"> <ul class="nav navbar-nav"> <li> <a href> <i class="fa fa-fw fa-lg fa-star"></i> <span>Menu 1</span> </a> </li> <li> <a href> <i class="fa fa-fw fa-lg fa-font"></i> <span>Menu 2</span> </a> </li> <li> <a href> <i class="fa fa-fw fa-lg fa-rocket"></i> <span>Menu 3</span> </a> </li> <li> <a href> <i class="fa fa-fw fa-lg fa-cog"></i> <span>Menu 4</span> </a> </li> </ul> </nav>
4. JavaScript to add/remove selected CSS class to the sidebar menu.
$(document).ready(function() { $('a').click(function(event) { $('a').removeClass('selected'); $(this).addClass('selected'); event.preventDefault(); }) });
expanding sidebar navigation with jquery, bootstrap-vertical-menu Plugin/Github
See Demo And Download
Official Website(josenriq): Click Here
This superior jQuery/javascript plugin is developed by josenriq. For extra advanced usage, please go to the official website.