嗨,因为我是这个jquery的新手可以任何人帮助我这个我想显示div并隐藏潜水后trasnsition这里是脚本
jQuery(function($) {
$('a.panel').click(function() {
var $target = $($(this).attr('href')),
$other = $target.siblings('.active'),
animIn = function () {
$target.addClass('active').show().css({
left: -($target.width())
}).animate({
left: 0
}, 300);
};
if (!$target.hasClass('active') && $other.length > 0) {
$other.each(function(index, self) {
var $this = $(this);
$this.removeClass('active').animate({
left: -$this.width()
}, 300, animIn);
});
} else if (!$target.hasClass('active')) {
animIn();
}
});
});
Run Code Online (Sandbox Code Playgroud) jquery ×1