I have two sliding panels, panel 1 slides down, and panel2 moves to the left. I want to close panel1 when opening panel2. I know that many similar questions have already been answered, but I could not understand how to apply them on my site.
$(document).ready(function(){
$(".slide-btn1").click(function(){
$("#panel1").toggle("slow");
$(this).toggleClass("active");
return false;
});
$(".slide-btn2").click(function(){
$("#panel2").slideToggle("slow");
$(this).toggleClass("active");
return false;
});
});
Edit: this is what I have done so far http://jsfiddle.net/Pukau/9CFgR/2/
source
share