-
Notifications
You must be signed in to change notification settings - Fork 602
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
select event fires multiple times with lazyLoad #504
Comments
I just ran in to the same issue. I'm just going to try debouncing it for now. |
Same issue here. |
Thanks for reporting this issue. For the record, this behavior is how Flickity is supposed to work — currently. When a cell's size changes, Flickity has to re-calculate the position of all the cells. Currently, it triggers That said, I'm looking into refactoring this behavior. Using |
I am having the same issue with |
I ran into the same problem, using |
🔔 add `on` option for capturing initial events ✅ add change test
🎉 Flickity v2.1.0 has been released with all new
// jQuery
$carousel.on( 'change.flickity', function( event, index ) {
console.log( 'Slide changed to ' + index )
});
// vanilla JS
flkty.on( 'change', function( index ) {...});
I'm now closing this issue. Please open a new issue if you into trouble with using |
Hi David!
Thanks a lot for your huge work on this project!
I'm experiencing some odd behavior. So, I run two carousels (main + navigation). If I use "lazyLoad" option in the main carousel, "select" event triggers as many times as how many images specified to lazy load + first image + 1 additional firing (3 in total). I reproduced this on Codepen: http://codepen.io/wpspd/pen/GNzGdg As I understand, this shouldn't happen every time after lazy loading and, moreover, within the navigation. Now I need to use hacks to do not take into account false triggers. Is there any official workaround? Thanks in advance!
The text was updated successfully, but these errors were encountered: