When I'm pressing toggle button , jquery adds '.active' class to '.sidebar-contact', then in css .sidebar-contact.active should be activated , but nothing happens.
CSS
.sidebar-contact{
position: fixed;
transform: translateY(-50%);
top: 50%;
left: -350px;
width: 350px;
height: auto;
padding: 20px;
background: #fff;
box-sizing: border-box;
transition: .5s;
}
.sidebar-contact.active
{
left:0px;
}
.toggle{
position: absolute;
top: 0;
right: -48px;
width: 48px;
height: 48px;
line-height: 48px;
cursor: pointer;
text-align: center;
background: #f00;
}
jQuery
$(document).ready(function(){
$('.toggle').click(function(){
$('.sidebar-contact').toggleClass('.active')
});
});