cycle icon indicating copy to clipboard operation
cycle copied to clipboard

Custom transition that doesn't fade out, only fades in

Open oskarrough opened this issue 11 years ago • 0 comments

I'm trying to create a custom transition that fade in the next slide on top. The curr slide should not fade out before the next is faded completely in on top. This is what I thought would work but visibility is playing me.

Any ideas? Thank you.

$.fn.cycle.transitions.fadeInOnly = {
    before: function( opts, curr, next, fwd ) {
        var css = opts.API.getSlideOpts( opts.nextSlide ).slideCss || {};

        // Rezindexes the slide deck, puts next on top
        opts.API.stackSlides( next, curr, fwd );

        opts.cssBefore = { opacity: 0, visibility: 'visible' };
        opts.animIn = { opacity: 1, visibility: 'visible' };
        opts.animOut = { opacity: 1, visibility: 'visible' };
    }
};

oskarrough avatar Mar 23 '14 22:03 oskarrough