I have installed TWO slideDown panels. Please see my website: link text
I only want one panel open at one time. How do I make so that if one panel is opened the other will close automatically?
Here is my current code:
$(document).ready(function() {
$("#open").click(function(){
$("div#panel_quote").slideDown("slow");
});
$("#close").click(function(){
$("div#panel_quote").slideUp("slow");
});
$("#toggle a").click(function () {
$("#toggle a").toggle();
});
$("#open").click(function(){
$("div#panel_login").slideDown("slow");
});
$("#close").click(function(){
$("div#panel_login").slideUp("slow");
});
$("#toggle a").click(function () {
$("#toggle a").toggle();
});
});
<script type="text/javascript">
$(document).ready(function(){
$(".btn-slide").click(function(){
$("#panel_quote").slideToggle("slow");
$(this).toggleClass("closeQ"); return false;
});
});
</script>
<script type="text/javascript">
$(document).ready(function(){
$(".btn-slide2").click(function(){
$("#panel_login").slideToggle("slow");
$(this).toggleClass("closeL"); return false;
});
});
</script>