<script type="text/javascript">
$(document).ready(function(){
$("#toggle").toggle(
function(){
$("#box1").slideToggle(800,function(){
$("#box2").slideToggle();
});
},
function(){
$("#box2").slideToggle(800,function(){
$("#box1").slideToggle();
});
}
);
});
</script>
<div id="box1">
<a href="#" class="order" id="toggle"> </a>
</div>
<div id="box2" style="display:none;">
<a href="#" class="back" id="toggle"> </a>
</div>
- It works only for the first click. When I click it again it doesn't slide back.
- How to animate it to slide left to right?