Lightweight and Pure CSS Mega Menu For Bootstrap 3 - Yamm

Lightweight and Pure CSS Mega Menu For Bootstrap 3 - Yamm
File Size: 34.8 KB
Views Total:
Last Update:
Publish Date:
Official Website: Go to website
License: MIT
   

A lightweight and pure CSS mega menu solution which allows you to add almost any components into your Bootstrap navbar.

How to use it:

1. Load the core stylesheet yamm.css into your Bootstrap project which has jQuery and bootstrap.min.js installed.

<link href="yamm/yamm.css" rel="stylesheet">

2. Create a mega menu for your navbar using Bootstrap fluid grid system.

<div class="navbar yamm navbar-default navbar-fixed-top">
  <div class="container">
    <div class="navbar-header">
      <button type="button" data-toggle="collapse" data-target="#navbar-collapse-1" class="navbar-toggle"><span class="icon-bar"></span><span class="icon-bar"></span><span class="icon-bar"></span></button><a href="#" class="navbar-brand">Yamm Megamenu</a>
    </div>
    <div id="navbar-collapse-1" class="navbar-collapse collapse">
      <ul class="nav navbar-nav">
        <li class="dropdown"><a href="#" data-toggle="dropdown" class="dropdown-toggle">List<b class="caret"></b></a>
          <ul class="dropdown-menu">
            <li>
              <div class="yamm-content">
                <div class="row">
                  <ul class="col-sm-2 list-unstyled">
                    <li>
                      <p><strong>Section Title</strong></p>
                    </li>
                    <li>List Item</li>
                    <li>List Item</li>
                    <li>List Item</li>
                    <li>List Item</li>
                    <li>List Item</li>
                    <li>List Item</li>
                  </ul>
                  <ul class="col-sm-2 list-unstyled">
                    <li>
                      <p><strong>Links Title</strong></p>
                    </li>
                    <li><a href="#"> Link Item </a></li>
                    <li><a href="#"> Link Item </a></li>
                    <li><a href="#"> Link Item </a></li>
                    <li><a href="#"> Link Item </a></li>
                    <li><a href="#"> Link Item </a></li>
                    <li><a href="#"> Link Item </a></li>
                  </ul>
                  <ul class="col-sm-2 list-unstyled">
                    <li>
                      <p><strong>Section Title</strong></p>
                    </li>
                    <li>List Item</li>
                    <li>List Item</li>
                    <li>List Item</li>
                    <li>List Item</li>
                    <li>List Item</li>
                    <li>List Item</li>
                  </ul>
                  <ul class="col-sm-2 list-unstyled">
                    <li>
                      <p><strong>Section Title</strong></p>
                    </li>
                    <li>List Item</li>
                    <li>List Item</li>
                    <li>
                      <ul>
                        <li><a href="#"> Link Item </a></li>
                        <li><a href="#"> Link Item </a></li>
                        <li><a href="#"> Link Item </a></li>
                      </ul>
                    </li>
                  </ul>
                </div>
              </div>
            </li>
          </ul>
        </li>
      </ul>
    </div>
  </div>
</div>

3. Sometimes you need to revent unexpected menu close when using some components.

$(document).on('click', '.yamm .dropdown-menu', function(e) {
   e.stopPropagation()
})

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