jQuery Supersized AfterAnimation

2019-05-31 22:31发布

I am trying to use the afterAnimation event on the SuperSized jQuery plugin (docs:http://buildinternet.com/project/supersized/docs.html#theme-after) but cannot get it to fire.

Code (sample):

$.supersized({              
    //Functionality
    slideshow               :   1,
    autoplay                :   1,
    start_slide             :   1,
    stop_loop               :   0,
    random                  :   0,  
    slide_interval          :   3000,
    transition              :   6,
    transition_speed        :   1200,

    // .. removed for clarity

    //Theme Options            
    progress_bar            :   1,  
    mouse_scrub             :   0,
    // This is where i'm trying to call afterAnimation()
    afterAnimation          : function() {
        console.log('blech');
    }}
});

Any guidance would be greatly appreciated!

1条回答
We Are One
2楼-- · 2019-05-31 22:59

Turns out that I was pretty close.

After the initialization of supersized, you can do this:

theme.afterAnimation = function() {
    console.log('animate');
};
查看更多
登录 后发表回答