Mobile First Multi-level Toggle Menu With jQuery - cookcodesmenu

File Size: 20.6 KB
Views Total: 8178
Last Update:
Publish Date:
Official Website: Go to website
License: MIT
Mobile First Multi-level Toggle Menu With jQuery - cookcodesmenu

cookcodesmenu is a simple yet fully configurable jQuery navigation plugin that lets you create a responsive, mobile-first, multi-level dropdown toggle menu for your cross-platform webapp.

More features:

  • Allows to set the breakpoint the cookcodesmenu will display.
  • Hamburger menu toggle button.
  • jQuery animations and easying effects supported.
  • Callback functions.
  • Cross browser.

How to use it:

1. Load the needed JavaScript and CSS files in the document.

<link rel="stylesheet" href="cookcodesmenu.css">
<script src="" 
<script src="jquery.cookcodesmenu.js"></script>

2. Create nested html lists for the cookcodesmenu.

<ul id="menu">
  <li>Parent 1
      <li> <a href="#">item 3</a> </li>
      <li> <a href="#">Parent 3</a>
          <li> <a href="#">item 8</a> </li>
          <li> <a href="#">item 9</a> </li>
          <li> <a href="#">item 10</a> </li>
      <li> <a href="#">item 4</a> </li>
  <li> <a href="#">item 1</a> </li>
  <li>Parent 2
      <li> <a href="#">item 5</a> </li>
      <li> <a href="#">item 6</a> </li>
      <li> <a href="#">item 7</a> </li>

3. Just call the function on the top list and done.

$(function() {

4. To config the plugin, override the default settings and pass the options object to the cookcodesmenu() function.

  display: 1920, // From where mobile menu apears and desktop  menu gone
  brand: 'LOGO', // Supports HTML
  label: 'MENU', // Menu Label: // Supports HTML
  duplicate: true,
  duration: 200, // In milliseconds
  easingOpen: 'swing', // Easing function
  easingClose: 'swing',
  closedSymbol: "&#10133;", //Supports HTML
  openedSymbol: "&#10134;", //Supports HTML
  prependTo: 'body',
  appendTo: '',
  parentTag: 'a',
  closeOnClick: true,
  allowParentLinks: true,
  nestedParentLinks: true,
  showChildren: false,
  removeIds: true,
  removeClasses: false,
  removeStyles: false,
  animations: 'jquery'

5. Possible callback functions.

  init: function () {},
  beforeOpen: function () {},
  beforeClose: function () {},
  afterOpen: function () {},
  afterClose: function () {}

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