如何从右到左滑动切换div? [英] How to slide toggle a div right to left?

查看:123
本文介绍了如何从右到左滑动切换div?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

请参阅此小提琴 http://jsfiddle.net/MKwwH/

我希望链接 images-link 从右向左滑动切换?

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


推荐答案

问题是左右设置。只需将其设置为0就可以了。

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

这篇关于如何从右到左滑动切换div?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆