I have the following code, below it toggles up and down fine. but how can i make the panel to toggle left and right? I want the SLide Panel to show at the edge when closed and show at the expanded side when opened
something like this but on the left instead of at the top. http://www.webdesignerwall.com/demo/jquery/simple-slide-panel.html
<script type="text/javascript">
$(document).ready(function(){
$(".btn-slide").click(function(){
$("#panel").slideToggle("slow");
//$("#panel").slideToggle("slow", {direction: "left"}, 100);
$(this).toggleClass("active"); return false;
});
});
</script>
CSS
<style>
/** left sliding panel **/
#panel {
/** background: #754c24; */
height: 500px;
display: none;
}
.slide {
margin: 0;
padding: 0;
/* border-top: solid 4px #422410; */
background: url(images/btn-slide.gif) no-repeat center top;
}
.btn-slide {
background: url(images/white-arrow.gif) no-repeat right -50px;
text-align: center;
width: 144px;
height: 31px;
padding: 10px 10px 0 0;
margin: 0 auto;
/* display: block; color: #fff;*/
font: bold 120%/100% Arial, Helvetica, sans-serif;
text-decoration: none;
}
</style>
Html
<div id="panel">
content will be shown here.
</div> <!-- end Panel content-->
<div id="openCloseWrap">
<p class="slide"><a href="#" class="btn-slide">Slide Panel</a></p>
</div>
</div>