小编Md *_*eem的帖子

jquery显示块/无

嗨,因为我是这个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

0
推荐指数
2
解决办法
3万
查看次数

标签 统计

jquery ×1