jquery循环中的after / before函数问题

时间:2011-04-01 08:31:18

标签: jquery function cycle

我想在jquery循环中触发before函数。目前它只适用于after函数,如下所示: http://expostay.gtis.org/template/ (请等待5秒,然后你会看到一个箭头动画)

我希望在幻灯片开始消失之前播放这个动画! 但当我将“之后:”更改为“之前:”时,它完全吓坏了: http://expostay.gtis.org/template/index_before.html

但我不知道为什么?

这是功能:

function currentItem(curr, next, opts) { 
    var index = opts.currSlide;
    $('.tabs .innercontent').animate({"height":93},"normal",
        function(){
                    $('.tabs a').removeClass("selected");
                    $('.tabs a:eq('+index+')').addClass("selected");    
            $(this).animate({"height":115},"normal");
        }                                
    );
};

这是循环代码:

$('#slideshow a:first').hide().delay(2000).fadeIn(1000, function() {
        $('#slideshow').cycle({ 
            fx: 'fade',
            timeout: 3000,
            slideResize:false,
            containerResize:false,
            before: currentItem
    });
}); 

0 个答案:

没有答案
相关问题