Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

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

Open
oskarrough opened this issue Mar 23, 2014 · 0 comments
Open

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

oskarrough opened this issue Mar 23, 2014 · 0 comments

Comments

@oskarrough
Copy link

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' };
    }
};
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant