Contact me See Resume

Simple Full height Vertical Menu -

Simple Full height Vertical Menu

Catagory : jQuery Posted : February, 11, 2019
vertimal menu example

Hello friends, Here we are going to create a simple full height vertical menu with the help of jQuery. Some time our web page need more attention on content more than its design and layout. Then some of layout take more than sufficient space of web page like menus / navigation, footer, social media icons, about author etc.

In this condition the we can make these elements initial hidden by providing a link or button. When user requires information from these elements, the can grab it by clicking a link or button.

Specially when user is on a small screen device this feature is very useful to increase readability and GUI of layout.

Here is we can better understand by example

vertical menu button

In the above image we can see the main focus of user is being on the main content.

vertimal menu example

and in above image example need the menu, it will appear by clicking the menu button on top left corner of page.

Lets code for the achieve the result together.

Step 1 : The HTML markup

<div class="sidemenu">
  <div class="nav">
<span class="cross"> &#10006</span>
  <div class="inner">
    <h2>Slide Menu</h2>
    <p>Lorem ipsum dolor sit amet, consectetur adipisicing elit. Minus rerum sit, quo error omnis totam dolores inventore dolore, eos sint, maxime magnam alias optio aut quasi cumque natus, eum? Praesentium.</p>
        <li><a href="#">Home</a></li>
        <li><a href="#">Abous Us</a></li>
        <li><a href="#">Services</a></li>
        <li><a href="#">Projects</a></li>
        <li><a href="#">Contact</a></li>
        <li><a href="#">Feedback</a></li>

      <p><a href="" target="_blank">&copy;</a></p>
<span class="show">&#9776; Menu</span>

Step 2 : The style for HTML Markup

  position: fixed;
  top: 0px;
  background: #ccc;
  z-index: 999;
    width: 30px;
    height: 30px;
    position: absolute;
    background: skyblue;
    text-align: center;
    line-height: 30px;
    display: block;
    cursor: pointer;
    left: 270px;

    width: 80px;
    height: 40px;
    padding: 0 10px;
    background: skyblue;
    text-align: center;
    line-height: 40px;
    display: block;
    cursor: pointer;
    position: fixed;
    top: 0;
    z-index: 2;
    font-family: arial;
    width: 300px;
    min-height: 100vh;
    /*height: 100%;*/
    display: block;
    background: #ccc;
    position: absolute;
    margin-left: -300px;
    z-index: 3;
  .inner ul{
    list-style: none;
  .inner ul li{
    width: 100%;
    height: 50px;
    background: skyblue;
    margin: 5px 0;
    line-height: 50px;

  .inner ul li a{
    display: block;
    margin-left: 10px;

Step 3 : The jQuery to make show or hide the vertical menu

<!--cdn link for jQuery library -->
 <script src=""></script>
<!--custum script starts -->
  $('.cross, .container').click(function(){
    $('.container').css('opacity', '1');
    $('.container').css('opacity', '0.3');
<!--custum script ends -->

Leave a Reply

You have to agree to the comment policy.

  1. Rakhi says:

    Nrsh ji rocks

    1. Naresh Pal says:


  2. Dilip Kumar says:

    Nice one sir it looks really great work done by you..

    1. Naresh Pal says:

      Thanks a lot for appreciation