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

Delay animation? #74

Open
Shizart opened this issue Oct 9, 2018 · 1 comment
Open

Delay animation? #74

Shizart opened this issue Oct 9, 2018 · 1 comment

Comments

@Shizart
Copy link

Shizart commented Oct 9, 2018

Love this. Is there a way to delay or time the amount of time spent inview? I am using fullpage.js and our animation kicks off if a user goes past the section as it does appear on screen when scrolling by but only for a milisecond but that is long enough for the animation to start. Looking for a way to say something like "once in view for >1second, do something". Thanks.

@Devin0231577
Copy link

Devin0231577 commented Jan 18, 2019

    $('.notification').on('inview', function (event, isInView) {
        let $this = $(this);
        if (isInView) {
            setTimeout(function () {
                $this.css('opacity', 0.5);
            }, 2000);
        } else {

        }
    });

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

2 participants