Responsive Expanding Sidebar Hamburger Menu | Shy Menu

Shy Menu is a jQuery script to create a hamburger toggle icon that expands to a side menu panel with CSS3 transitions.

hamburger menu right side codepen, shy hamburger menu right, responsive sidebar hamburger menu, best responsive hamburger menu, how to remove hamburger menu

How to make use of it:

1. The HTML to create a corner menu with a hamburger toggle.

<div class="shy-menu">
  <a class="shy-menu-hamburger">
    <span class="layer top"></span>
    <span class="layer mid"></span>
    <span class="layer btm"></span>
    </a>
  <div class="shy-menu-panel">
    <ul>
      <li><a href="#">link 1</a></li>
      <li><a href="#">link 2</a></li>
      <li><a href="#">link 3</a></li>
    </ul>
  </div>
</div>

<div class="menu open">
  <a class="hamburger">
    <span class="layer top"></span>
    <span class="layer mid"></span>
    <span class="layer btm"></span>
  </a>
</div>

2. CSS/CSS3 styles required for the shy menu.

* {
  -moz-transition: all .4s cubic-bezier(.1,.7,.3,1);
  -webkit-transition: all .4s cubic-bezier(.1,.7,.3,1);
  -o-transition: all .4s cubic-bezier(.1,.7,.3,1);
  -ms-transition: all .4s cubic-bezier(.1,.7,.3,1);
  transition: all .4s cubic-bezier(.1,.7,.3,1);
}

ul {
  list-style: none;
  margin: 0 0 0 15px;
  padding: 0;
}

.shy-menu { 
  display: block;
  height: 35px;
  padding: 5px;
  width: 35px;
  
  background-color: rgba(33,40,44,.1);
  border-bottom-right-radius: 10px;
  color: #fff;
}
.shy-menu.is-open,
.shy-menu:hover { 
  background-color: rgba(33,40,44,1);
}

.shy-menu.is-open {
  height: 150px;
  width: 100px;
}

.shy-menu-panel { 
  margin-left: -100px;
}
.is-open .shy-menu-panel { 
  margin-left: 0;
}

3. Style and animate hamburgers with CSS3 transformations.

.shy-menu-hamburger {
  position: relative;
  left: 0;
  top: 0;
  width: 54px;
  height: 54px;
  display: block;
  overflow: hidden;
  cursor: pointer;
}

.shy-menu-hamburger > .layer {
  background-color: #fff;
  border-radius: 1px;
  display: block;
  height: 2px;
  overflow: hidden;
  position: absolute;
    left: 5px;
  width: 18px;
}

.shy-menu-hamburger .layer.top { top: 9px; }
.is-open .shy-menu-hamburger .layer.top { 
  top: 17px;
  left: 5px;
  transform: rotate(45deg);
}
.shy-menu-hamburger .layer.mid { top: 16px; }
.is-open .shy-menu-hamburger .layer.mid {
  opacity: 0;
  left: 0;
}
.shy-menu-hamburger .layer.btm { top: 23px; }
.is-open .shy-menu-hamburger .layer.btm { 
  top: 17px;
  left: 5px;
  transform: rotate(-45deg);
}

4. Download the latest jQuery JavaScript library from the CDN.

<script src="//code.jquery.com/jquery-1.11.2.min.js"></script>

5. Activate the shy menu with the following JavaScript snippets.

$(function() {
  
  initDropDowns($("div.shy-menu"));

});

function initDropDowns(allMenus) {

  allMenus.children(".shy-menu-hamburger").on("click", function() {
    
    var thisTrigger = jQuery(this),
      thisMenu = thisTrigger.parent(),
      thisPanel = thisTrigger.next();

    if (thisMenu.hasClass("is-open")) {

          thisMenu.removeClass("is-open");
      
          jQuery(document).off("click");                                 
          thisPanel.off("click");

    } else {      
      
        allMenus.removeClass("is-open");  
      thisMenu.addClass("is-open");
  
      jQuery(document).on("click", function() {
        allMenus.removeClass("is-open");
      });
      thisPanel.on("click", function(e) {
        e.stopPropagation();
      });
    }
    
    return false;
  });
}

jQuery/CSS3 Based Expanding Hamburger Menu, Shy menu Plugin/Github


See Demo And Download

Official Website(scavaille): Click Here

This superior jQuery/javascript plugin is developed by scavaille. For extra advanced usage, please go to the official website.

Related Posts

drag-drop-file-5x5-jq-uploader

Responsive Drag and Drop File Uploader/Download Plugin | 5x5_jq_uploader

5x5_jq_uploader plugin can be used to instantly create a drop file area and file queue with a little bit of preparation. Bootstrap is used for responsive planning…

Bootstrap-Dark-Mode

Stylesheet For Implementing Dark Mode with Bootstrap

Bootstrap Dark Mode provides a style sheet and two texts that allow you to implement Dark Mode on your website. Initially loaded based on user preferences, can…

responsive-navigation-menu

Multi-purpose Navigation Menu for Javascript Library | jQuery Corenav

coreNavigation is a multipurpose navigation menu for a jquery based javascript library, comes with more style, and is easy to integrate. 11 Default Menu 2 Responsive Navigation…

Simple-Multi-Select-Dropdown-Pure-Vanilla-Javascript

Simple Multi-Select Dropdown Pure Vanilla Javascript | multiSelect.js

MultiSelect.js is a simple, clean, and progressive JavaScript library designed for easy integration with any type of project or system. The design was heavily influenced by the…

Confetti-Falling-Animation-Effect-party

Confetti Falling Animation Effect In JavaScript | party.js

Party.js is a JavaScript library to brighten user site experience with visual effects! Celebrate success with dom confetti! The library is written in TypeScript and compiled into…

how-to-create-popup-in-html-with-css

How To Create A Popup in HTML with CSS

How to create popup in html with css – Popup without JavaScript is an elegant pop-up panel component with an animated scale, written in CSS. Have you…