Responsive Scrolling Bootstrap Nav Menu Plugin With jQuery Carousel Menu - Download Responsive Scrolling Bootstrap Nav Menu Plugin With jQuery - Carousel Menu

Download Responsive Scrolling Bootstrap Nav Menu Plugin With jQuery – Carousel Menu

Posted on

This time I will share jQuery Plugin and tutorial about Responsive Scrolling Bootstrap Nav Menu Plugin With jQuery – Carousel Menu, hope it will help you in programming stack.

Responsive Scrolling Bootstrap Nav Menu Plugin With jQuery Carousel Menu - Download Responsive Scrolling Bootstrap Nav Menu Plugin With jQuery - Carousel Menu
File Size: 10.1 KB
Views Total: 8175
Last Update:
Publish Date:
Official Website: Go to website
License: MIT
   

The Bootstrap Carousel Menu plugin allows you to convert the native Bootstrap nav into a carousel-style scrolling menu with next/prev navigation. Great for long site navigation when there is no enough screen space to display all the menu items.

How to use it:

1. Make sure you have jQuery library loaded in your Bootstrap project.

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

2. Download and include the Bootstrap Carousel Menu plugin’s JavaScript and CSS on the webpage.

1 <script src="/path/to/carousel-menu.css.js"></script>
2 <link href="/path/to/carousel-menu.css" rel="stylesheet">

3. Create the scrolling Bootstrap nav following the markup structure like this:

01 <nav role="navigation" class="navbar">
02   <div class="navbar-header">
03     <button data-target=".horizontal-menu" data-toggle="collapse" class="navbar-toggle collapsed" type="button">
04       <span class="sr-only"><a href="https://www.jqueryscript.net/tags.php?/Navigation/">Navigation</a></span>
05       <span class="icon-bar"></span>
06       <span class="icon-bar"></span>
07       <span class="icon-bar"></span>
08     </button>
09   </div>
10  
11   <div class="collapse navbar-collapse horizontal-menu">
12     <ul class="nav navbar-nav">
13       <li class="active"><a href="#">Home</a></li>
14       <li><a href="#">Link 1</a></li>
15       <li><a href="#submenu">Link 2</a></li>
16     </ul>
17     <ul class="nav navbar-nav">
18       <li class="dropdown">
19         <a href="#" class="dropdown-toggle" data-toggle="dropdown">Dropdown<b class="caret"></b></a>
20         <ul class="dropdown-menu">
21           <li><a href="#">Item 1</a></li>
22           <li><a href="#">Item 2</a></li>
23           <li><a href="#">Item 3</a></li>
24         </ul>
25       </li>
26       <li><a href="#submenu">Link 3</a></li>
27       <li><a href="#submenu">Link 4</a></li>
28     </ul>
29   </div><!-- /.navbar-collapse -->
30 </nav>

4. Initialize the plugin and we’re done.

1 $('nav').carouselMenu();

5. Default plugin options.

1 $('nav').carouselMenu({
2   duration: 500, // in ms
3   height: 'auto',
4   hoverEffect: false,
5   nextClass: "button right",
6   nextId: "carousel-menu-next",
7   prevClass: "button left",
8   prevId: "carousel-menu-prev"
9 });

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

source : jqueryscript.net