angela angela - 4 months ago 21
jQuery Question

How to slide toggle a div right to left?

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

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;
}