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 inview #58

Open
ktorti opened this issue Sep 8, 2016 · 1 comment
Open

delay inview #58

ktorti opened this issue Sep 8, 2016 · 1 comment

Comments

@ktorti
Copy link

ktorti commented Sep 8, 2016

I have animated SVG's within a panel and I was wondering if there was a way to delay the inview animation? I'm new at JS so go easy on me.

@andypillip
Copy link

Maybe you should post this support question on stackoverflow.

setTimeout() is the oldschool JavaScript way of delaying things.

function startAnimation() {
// put your code to start the animation here
};

$('#animationElement').on('inview', function(e, visible) {
  if (visible) {
    window.setTimeout(1000, startAnimation); // 1000 ms = 1 s
  }
});

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