USE THIS FOR RIGHT TO LEFT SLIDING :
HTML:
<div class="nav ">
<ul>
<li><a href="#">HOME</a></li>
<li><a href="#">ABOUT</a></li>
<li><a href="#">SERVICES</a></li>
<li><a href="#">CONTACT</a></li>
</ul>
</div>
CSS:
/*nav*/
.nav{
position: fixed;
right:0;
top: 70px;
width: 250px;
height: calc(100vh - 70px);
background-color: #333;
transform: translateX(100%);
transition: transform 0.3s ease-in-out;
}
.nav-view{
transform: translateX(0);
}
.nav ul{
margin: 0;
padding: 0;
}
.nav ul li{
margin: 0;
padding: 0;
list-style-type: none;
}
.nav ul li a{
color: #fff;
display: block;
padding: 10px;
border-bottom: solid 1px rgba(255,255,255,0.4);
text-decoration: none;
}
JS:
$(document).ready(function(){
$('a#click-a').click(function(){
$('.nav').toggleClass('nav-view');
});
});