-
Notifications
You must be signed in to change notification settings - Fork 17
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
Flickity.create is Undefined #34
Comments
I was getting this issue too. I got it to work by downgrading Flickity Fullscreen to the latest of version 1. https://unpkg.com/flickity-fullscreen@1/fullscreen.css |
I am also getting this error. What's worse is that flickity-fullscreen-button doesn’t even appear. Here’s a dummy page: http://tatjanapreuss.de/index.php/de/arbeiten/work-de-020 Reverting to Flickity fullscreen v1.1.1 as suggested by graysonlee123 removes the error message, but the button is still missing. Flickity itself is working fine. I’m on Joomla! 4 (which uses vanilla JavaScript) and initiated Flickity via HTML. Any ideas? I’ve been stuck on this problem for days. |
Wow, that worked beautifully!! |
Did you add the |
Yes, I initialized Flickity in HTML, and all the other attributes work as expected. Only flickity-fullscreen doesn't.
I inserted the code from fullscreen.js right under the flickity code itself in my user.js file. Does flickity-fullscreen only work if they are in separate files? |
I finally managed to work around the problem by downgrading, too. For some reason, fullscreen.js v1.1.1 downloaded here from GitHub didn’t work on my site – but fullscreen.js v1.1.1 grabbed from this CodePen (file hosted on unpkg.com) did. I didn’t really spend a lot of time comparing the files, so I don’t know what the difference is. I now use this combo: flickity.pkgd.js v2.3.0 – downloaded from GitHub |
I solved (even with the last release) with the correct order of js: before the generic flickity.js, and then the specific fullscreen.js:
and not
EDIT |
I'll preface this by saying I'm not a professional dev by any means, but I'm working on a project and came across this error. As was said above, using an older version worked but the following also worked for me. Its sorta an amalgamation of v1.1.1 and v2. Move line 30, ( Then replace I can't explain why it works, as I said above I'm not a professional, but it got rid of the undefined error, and allowed me to use the rest of the v2 file. At a quick glance, it appears to do the trick - the fullscreen button appears and Flickity goes fullscreen. But there might be ramifications to this change I'm not currently aware of |
If you look at the repos commits, the current changes are there to work with V3 of the main flickity branch, which is as yet unreleased. Use v1.1.1 for now if you are using ~v2.1.3 of Flickity. |
Did you manage to solve the button issue? I have the same problem. Using fullscreen v1.1.1 the error goes away, but the button does not show up. I initialize everything with vanilla javascript. |
Yes, as described in my comment on July 1st, 2022. It's still working, but I never found out why and I haven't looked into it since. There must be a minute but important difference between fullscreen.js v1.1.1 from GitHub and fullscreen.js v1.1.1 from CodePen, which I didn't find because I'm no dev. Try the one from CodePen. It worked for me.
I initialize with HTML. Don't know if it makes a difference to the issue. |
More than a year later your solution worked for me, thank you! |
The answer is mutch simpler: Thus in your head you put this:
In the body you put this:
The number after the @-char indicates the version B-) Kind regards |
The text was updated successfully, but these errors were encountered: