Responsive Off-Canvas Navigation Menu Using CSS | Pushy

Pushy is responsive menu navigation with CSS transforms and transitions. This project is inspired by the Move Off-Canvas menu. This plugin is for creating off-board navigation, multi-level as I’ve seen in many mobile apps.

Features

  • Uses CSS transforms & transitions.
  • Smooth performance on mobile devices.
  • jQuery animation fallback for IE 7 – 9.
  • The menu closes when a link is selected.
  • The menu closes when the site overlay is selected.
  • Auto-collapsible submenus.
  • Left or right menu position.
  • It’s responsive!

Must Read: Push Menu Plugin That Slides Out An Off-canvas Navigation | jQuery.SecretNav

How to make use of it:

1. Include the jQuery library and jQuery pushy plugin within the web page.

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

2. Include modernizr.js for older IE help.

<script src="js/vendor/modernizr-2.6.2.min.js"></script>

3. Create the aspect menu from nested HTML lists as follows:

<nav class="pushy pushy-left">
  <ul>
    <li><a href="#">Submenu 1</a></li>
    <li><a href="#">Submenu 2</a></li>    
    <li class="pushy-submenu">
      <button>Submenu 3</button>
      <ul>
          <li class="pushy-link"><a href="#">Item 1</a></li>
          <li class="pushy-link"><a href="#">Item 2</a></li>
          <li class="pushy-link"><a href="#">Item 3</a></li>
      </ul>
    </li>
    <li><a href="#">Item 1</a></li>
    <li><a href="#">Item 2</a></li>
    <li><a href="#">Item 3</a></li>
  </ul>
</nav>

4. Create the HTML for the background overlay when the menu is opened.

<div class="site-overlay"></div>

5. Create a menu toggle button in your essential content.

<div id="container"> 
  <div class="menu-btn">&#9776; Menu</div>
  YOUR MAIN CONTENT
</div>

6. Set the targeted menu item when the menu is opened utilizing the data-focus attribute:

<nav class="pushy pushy-left" data-focus="#target">
<ul>
    <li><a href="#">Submenu 1</a></li>
    <li><a href="#">Submenu 2</a></li>    
    <li class="pushy-submenu">
      <button>Submenu 3</button>
      <ul>
          <li class="pushy-link"><a href="#">Item 1</a></li>
          <li class="pushy-link"><a href="#">Item 2</a></li>
          <li class="pushy-link"><a href="#">Item 3</a></li>
      </ul>
    </li>
    <li><a href="#">Item 1</a></li>
    <li><a href="#">Item 2</a></li>
    <li><a href="#">Item 3</a></li>
  </ul>
</nav>

7. Change the default class for toggling the menu:

<nav class="pushy pushy-right" data-menu-btn-class=".my-menu-btn">
  ...
</nav>

<button class="my-menu-btn">Menu</button>

Browser Compatibility

Must Read: [Off-Canvas] Simple and Clean Side Navigation Menu With Dropdowns | jSide Menu

DesktopMobile
IE 9-11Chrome (Android)
MS EdgeSafari (iOS)
Chrome 
Firefox 
Safari (Mac)

See Also –

Create Stackable Multi-level Sidebar Menu | HC Off-canvas Nav
JavaScript Library for Off-Canvas Menus (mobile style) | offcanvas.js
[Bootstrap 5] Responsive Navbar With off-canvas Display on Mobile


See Demo And Download

Official Website(christophery): Click Here

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

Related Posts

HStack-and-VStack-in-CSS

CSS Layout Components Horizontal/Vertical Stack | HStack and VStack

HStack and VStack in CSS – CSS layout components that (basically) stack anything horizontally and vertically. A pure CSS library that makes it easy to stack elements…

Floating-Whatsapp-Chat-Button

How to Add Floating Whatsapp Chat Button In HTML | venom-button

Venom Button is a very simple plugin for the jQuery floating WhatsApp button. Adds a floating button to your site that calls WhatsApp Click to Chat API. It will automatically start the WhatsApp…

Bootstrap-4-Sidebar-Menu-Responsive-Template

Bootstrap 4 Sidebar Menu Responsive Template | MDB

Bootstrap Side Navbar – Responsive sidebar template based on the Bootstrap 4 framework. An easy-to-use, totally responsive, Google Material Design impressed aspect navigation for modern web app…

bootstrap-5-treeview

Bootstrap 5 Treeview Dynamically Collapsible | bs5treeview

Bootstrap 5 Tree View is a very simple plug-in for creating a basic and elegant Treeview using BS5. For use with Bootstrap 5, the attributes have been…

Responsive-FAQ-Accordion-Dropdown

Responsive FAQ Accordion Dropdown In HTML and CSS

How to create responsive accordion Expandable and Collapsible Frequently Asked Questions Elements. Accordion HTML, is an easy and seamless accordion FAQ component built with CSS and HTML…

swiper-touch-slider

Modern Mobile Touch Slider With Acceleration Transitions | Swiper

Swiper is the most modern free mobile touch slider with accelerated device transitions and amazing original behavior. It is intended for use in mobile websites, mobile web…

Leave a Reply

Your email address will not be published. Required fields are marked *