幻灯片更改时为div设置动画

时间:2014-10-10 22:46:44

标签: jquery wordpress

我试图创建第一个网站[site-1] [1]和[site-2] [2]中存在的内容。现在我想要的是,每当网站上的幻灯片工作时,div应该动画

revapi2.bind("revolution.slide.onloaded",function (e) {
    //alert("slider loaded");
});

revapi2.bind("revolution.slide.onchange",function (e,data) {
    //alert("slide changed to: "+data.slideIndex);
    //data.slideIndex is the index of the li container in this Slider   
    //data.slide is the current slide jQuery object (the li element)    
});

revapi2.bind("revolution.slide.onpause",function (e,data) {
    //alert("timer paused");
});

revapi2.bind("revolution.slide.onresume",function (e,data) {
    //alert("timer resume");
});

revapi2.bind("revolution.slide.onvideoplay",function (e,data) {
    //alert("video play");
});

revapi2.bind("revolution.slide.onvideostop",function (e,data) {
    //alert("video stopped");
});

revapi2.bind("revolution.slide.onstop",function (e,data) {
    //alert("slider stopped");
});

revapi2.bind("revolution.slide.onbeforeswap",function (e) {
    //alert("before swap");
});

revapi2.bind("revolution.slide.onafterswap",function (e) {
    //alert("after swap");
});

revapi2.bind("revolution.slide.slideatend",function (e) {
    //alert("slide at end");
});
滑块的pi api使用希望它可能有帮助

这就是我想运行动画的方式,我想让动画在每张幻灯片上运行

revapi2.bind("revolution.slide.onloaded",function (e) {
        jQuery('#scrollBottom').css('-webkit-animation','bounce 1s 2');

    });

1 个答案:

答案 0 :(得分:1)

所以最后我能在这里解决我的问题,如何在每张幻灯片后重新启动动画

var scrollbottom = jQuery(' #rollBottom');

revapi2.bind(" revolution.slide.onbeforeswap",function(e){ scrollbottom.removeClass(' bounceanimate&#39)。宽度();

});

revapi2.bind(" revolution.slide.onafterswap",function(e){   scrollbottom.addClass(' bounceanimate&#39);

});

这里有很好的css技巧 restart css animation