Closed zacharybrady closed 9 years ago
Thanks for reporting this issue. Could you provide any more context: How are you loading JS? Are you using a framework?
I'm using Filament Group's LoadJS ( https://github.com/filamentgroup/loadJS ). The site is live here http://www.nationwidecoils.com/ if that helps.
I'm having a similar issue. I'm loading the js file in the head of my site.
If you can provide a reduced test case, I'd love to take a look.
Most likely, Flickity is initialized multiple times on the same element.
I wasn't able to replicate the problem in my reduced test case, which works as expected. It only seems to be happening in my dev environment. I'm using a static site generator Middlemanapp https://github.com/middleman/middleman
Here's my site https://github.com/cjeria/visualty/tree/flickity-rtc, I'll add you as a collaborator. Thx!
Solved this issue. If I understand this correctly, the JS was being loaded twice, once from the node_modules directory (I used npm install flickity
) and another from the head of my template. I simply deleted the one from the head and it works at it should. The CSS file however, needs to be called out in the head. Would be nice if it would load the same way as the JS file does with node_modules. Not sure how to configure that.
Closing this issue as its been quiet :ghost:
NOTE: Could not reproduce in a reduced test case. Leaving this here though just in case this fringe case can shed light on any other issues. As demonstrated in the screenshots, the .flickity-viewport and .flickity-slider container are occasionally generated twice. Which has the unfortunate result of causing this to happen to the slider:
I don't have too many details yet other than:
I'm going to set up a reduced test case and also keep testing in the environment it was caught in. Will update as findings come in.
UPDATES