Coder Social home page Coder Social logo

megamenu-js-bs4's Introduction

megamenu-js-bs4

The only Megamenu jQuery plugin + Bootstrap4 you ever want.

Updated: November 21, 2019

Image of the Megamenu-JS

This MegamenuJS is inspired by the (https://github.com/marioloncarek/megamenu-js) from @marioloncarek.

Features

  • Bootstrap4 support
  • Cross-browser compatibility
  • Smart - knows when to show megamenu, and when to show a normal dropdown
  • 100% responsive, works on all devices
  • Seamless wordpress integration
  • Super fast
  • Uses jquery animations (IE8 compatible)
  • Easy to use
  • Uses ionicons
  • Super small
  • Free to use and abuse (MIT licence)

Demos

Download and open index.html or:

Live Demo

Live demo on Codepen: megamenu.js demo

Installation

  1. This version uses Bootstrap4 CSS for the Demo index.html, so include the stylesheet from CDN:
<link rel="stylesheet" href="https://stackpath.bootstrapcdn.com/bootstrap/4.3.1/css/bootstrap.min.css" integrity="sha384-ggOyR0iXCbMQv3Xipma34MD+dH/1fQ784/j6cY/iJTQUOhcWr7x9JvoRxT2MZw1T" crossorigin="anonymous">

1.1) Copy CSS from style.css or style.less

1.2) megamenu.js uses ionicons for icons, so include stylesheet in your project:

<link rel="stylesheet" href="css/ionicons.min.css">
  1. Include jquery just before closing body tag </body>
<script src="https://cdnjs.cloudflare.com/ajax/libs/jquery/1.12.0/jquery.min.js"></script>
  1. Include megamenu.js below jquery
<script src="js/megamenu.js"></script>
  1. Wrap your menus HTML in megamenu.js wrappers and see the magic :)
<div class="menu-container">
        <div class="menu">
                <ul>
                  <li><a>Link</a></li>
                  <li>
                    <a>Mega Link</a>
                    <div class="mega-menu"><!-- Whatever, basic html menu(lists)! Dont worry megamenu.js will know --></div>
                  </li>
                </ul>
        </div>
    </div>

Usage and jQuery explanation

This version uses Bootstrap4 to build HTML content inside the Mega-menu HTML containers.

Wordpress integration

Use the custom HTML5 Walker to build the structure of your Wordpress menu that matches the Megamenu-JS example above:

1) In your functions.php add these lines (taken from HTML5blank by @toddmotto)

That customizes the menu from everything Wordpress has added and from this point the menu is like you are doing a static version.

2) Then simply wrap the wordpress menu with megamenu.js wrappers!

<div class="menu-container">
    <div class="menu">
      <?php wp_nav_menu(); ?>
    </div>
</div>

Made with (thanks)

megamenu-js-bs4's People

Contributors

wizzywiggs avatar rjnay1984 avatar orangewacko avatar

Stargazers

Dean Parkes avatar

Watchers

James Cloos avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.