Responsive Slide out Menu with CSS3 and jQuery jSide Plugin

- November 13, 2018

The jSide Menu is a jQuery plugin that helps you to create an awesome slide out menu for responsive web design projects. It creates a sticky (or static) hamburger button on the top of the page that enables the user to reveal a sidebar menu sliding from the left or right of the screen.

Written in: HTML, CSS and JavaScript
Frameworks: jQuery 3.3.1 & Material-Design-Iconic-Font 2.0

Main Features

  • +20 Built In Skins.
  • Fully Responsive and Customizable.
  • Unlimited main items and sub items can be added.
  • Sticky Profile.
  • CSS3 and jQuery Animations Enabled.
  • Material Design Iconic Fonts.
  • Background dim-overlay when menu open
  • Chrome, Safari, Firefox, Opera, IE7+, IOS, Android and windows phone supported.
  • User Friendly and Easy to Implement.

How to use it:

1. Load the jSide Menu plugin's JavaScript, CSS and Material Design Iconic Font file into HTML page.

<!--jQuery-->

<script src="https://code.jquery.com/jquery-3.3.1.slim.min.js" integrity="sha384-q8i/X+965DzO0rT7abK41JStQIAqVgRVzpbzo5smXKp4YfRvH+8abtTE1Pi6jizo" crossorigin="anonymous"></script>

<!--jSide Menu Plugin-->
<script src="js/jquery.jside.menu.js"></script>

<!--Material Design Iconic Font-->
<link rel="stylesheet" href="material-design/css/material-design-iconic-font.css" />

<!--jSide Menu CSS-->
<link rel="stylesheet" href="css/jside-menu.css">

<!--jSide Skins-->
<link rel="stylesheet" href="css/jside-skins.css" >
 

2. Create the menu header. Great for profile information.

<div class="menu-head">
  <span class="layer">
    <div class="col">
      <div class="row for-pic">
        <div class="profile-pic">
          <img src="profile.jpg" alt="profile" />
        </div>
      </div>
      <div class="row for-name">
        <h3 title="User Name"> Username </h3>
        <span class="tagline"> Tagline</span>
      </div>
    </div>
  </span>
</div>

3. Create a multi-level menu for the off-canvas navigation.

<nav class="menu-container">
  <ul class="menu-items">
    <li><span class="item-icon"><i class="zmdi zmdi-android"></i></span> <a href="#1"> Main item one </a></li>
    <li> <span class="item-icon"> <i class="zmdi zmdi-apple"></i> </span> <a href="#1"> Main item two </a></li>

    <li class="has-sub"> <span class="item-icon"> <i class="zmdi zmdi-windows"></i> </span> <span class="dropdown-heading"> Item three with dropdown </span>

      <ul>
        <li> <a href="#2">dropdown sub item 1 </a> </li>
        <li> <a href="#2"> dropdown sub item  </a> </li>
        <li> <a href="#2"> dropdown sub item  </a> </li>
      </ul>
    </li>
    <li class="has-sub"> <span class="item-icon"> <i class="zmdi zmdi-devices"></i> </span> <span class="dropdown-heading"> Item four with dropdown </span>
      <ul>
        <li> <a href="#2">sub item 1 </a> </li>
        <li> <a href="#2">sub item 2 </a> </li>
        <li> <a href="#2">sub item 3 </a> </li>
      </ul>
    </li>
    <li> <span class="item-icon"> <i class="zmdi zmdi-keyboard"></i> </span> <a href="#1"> Main item four </a></li>
    <li> <span class="item-icon"> <i class="zmdi zmdi-dock"></i> </span> <a href="#1"> Main item five </a></li>
  </ul>
</nav>

4. Create an overlay element that will overlay the main content when the navigation is revealed.

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

5. Call the function on the main menu and done.

$(".menu-container").jSideMenu();

6. Make the off-canvas navigation slide from the right of the webpage.

$(".menu-container").jSideMenu({
  jSidePosition: "position-right"
});

7. Decide whether to make the menu bar stick to the top of the webpage when scrolling down (Default: true).

$(".menu-container").jSideMenu({
  jSideSticky: false
});

8. Change the default skin. All possible skins:

  • flickr
  • fb-messenger
  • moonlit
  • park-life
  • d2f
  • steel-man
  • amethyst
  • between-clouds
  • crazy-orange
  • endless-river
$(".menu-container").jSideMenu({
  jSideSkin: "default-skin"
});

Did you liked my efforts? Drop a line:

Leave your reply.
EmoticonEmoticon