Smooth Sliding Navigation Menu With jQuery And CSS

File Size: 3.96 KB
Views Total: 3422
Last Update:
Publish Date:
Official Website: Go to website
License: MIT
Smooth Sliding Navigation Menu With jQuery And CSS

A jQuery & CSS based semantic slide menu which enables a trigger button to toggle a list of stacked menu items with a smooth sliding animation.

How to use it:

1. Create the slide menu from a regular HTML unordered list.

<ul class="menu">
  <li id="push">
      Trigger Button
  <li id="pushed-left-1">
  <li id="pushed-center">
  <li id="pushed-right-1">
  <li id="pushed-right-2">

2. The required CSS/CSS3 to style the slide menu. li, li .sub-menu {
  border-radius: 100%;
  height: 100px;
  width: 100px;
} {
  list-style: none;
  margin: 0;
  padding: 0;
} li {
  margin: 0;
  padding: 0;
  position: absolute;
  background-color: #5408FF;
  cursor: pointer;
  left: 0;
  right: 0;
  top: 0;
  bottom: 0;
  transition: all 0.5s;
  display: flex;
  justify-content: center;
  align-items: center;
} li span {
  color: #11111C;
  font-weight: 700;
  font-size: 1.5rem;
  letter-spacing: 0.1px;
} li .sub-menu {
  height: 100px;
  width: 100px;
  position: absolute;
  top: 100px;
  background-color: white;
} li:hover {
  background-color: #FF08FF;
} li#push {
  z-index: 50;
  background-color: #FF08FF;
} li#push span {
  font-size: 2rem;
} li#push.move {
  left: -200px;
} li#push.rotate {
  transform: rotate(-315deg);
} li#pushed-center {
  z-index: 10;
} li#pushed-left-1 {
  z-index: 20;
} li#pushed-left-1.move {
  left: -100px;
} li#pushed-right-1 {
  z-index: 30;
} li#pushed-right-1.move {
  left: 100px;
} li#pushed-right-2 {
  z-index: 40;
} li#pushed-right-2.move {
  left: 200px;

3. Load the latest version of jQuery JavaScript library (slim build) at the end of the HTML document.

<script src="" integrity="sha384-q8i/X+965DzO0rT7abK41JStQIAqVgRVzpbzo5smXKp4YfRvH+8abtTE1Pi6jizo" crossorigin="anonymous"></script>

4. Enable the slide menu by toggling the CSS classes using jQuery.

$(document).ready(function() {
    $('#push, #pushed-center, #pushed-left-1, #pushed-right-1, #pushed-right-2').toggleClass('move');

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