【发布时间】:2015-08-25 14:06:18
【问题描述】:
我将这个小提琴用于我的项目,但我想让目标从右向左滑动。如果您检查链接链接,您可以看到目标 div 从左向右滑动。
jQuery(function ($) {
$('a.panel').click(function () {
var $target = $($(this).attr('href')),
$other = $target.siblings('.active');
if (!$target.hasClass('active')) {
$other.each(function (index, self) {
var $this = $(this);
$this.removeClass('active').animate({
left: $this.width()
}, 500);
});
$target.addClass('active').show().css({
left: -($target.width())
}).animate({
left: 0
}, 500);
}
});
});
http://jsfiddle.net/sg3s/rs2QK/ 这是一个演示。
请帮助我真的很感激。
【问题讨论】:
标签: javascript jquery html animation slide