How to slide toggle a div right to left?

angela picture angela · Oct 11, 2013 · Viewed 30.1k times · Source

Please see this fiddle http://jsfiddle.net/MKwwH/

I want the link images-link to slide toggle right to left?

$(document).ready(function() {
  $('.hidden').hide()
});

$('.soundDiv-link').click(function() {
  $('#soundDiv').slideToggle("slow")
});

$('.videoDiv-link').click(function() {
  $('#videoDiv').next().animate({width: 'toggle'}, "slow")
});

$('.imagesDiv-link').click(function() {
  $('#imagesDiv').animate({width: 'toggle'}, "slow")
});

Answer

Smeegs picture Smeegs · Oct 11, 2013

The issue is that you have left and right set. Just set right to 0 and it will work.

http://jsfiddle.net/MKwwH/4/

#imagesDiv {
    background-color: yellow;
    width: 100%;
    height: 100%;
    position: fixed;
    top: 0px;
    bottom: 0px;
    right: 0px;
    overflow: hidden;
    display: none;
}