-
Notifications
You must be signed in to change notification settings - Fork 25
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
Execute functions based on scroll index #11
Comments
I think it should work if you do this: $: if (index == 2) {
count();
} I've opened PR #14 to avoid repeated calls to the function (you could alternatively use another variable to keep track of whether |
Hello! I was wondering this too. I tried this as well but my function ended up getting called over 100 times and glitching. |
@maxgraze here is the version where I tried to fix the issue of repeated function calls: https://github.com/jtrim-ons/svelte-scroller/blob/fewer-section-updates/Scroller.svelte . If you decide to give it a try, let us know if it works. |
Is it possible to execute arbitrary functions such as:
This is possible in something like scrollama.js, and I would like to use svelte-scroller to do so if possible as it's already built into Svelte.
The text was updated successfully, but these errors were encountered: