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

How to destroy #21

Closed
bugsarekillingme opened this issue Mar 21, 2023 · 2 comments
Closed

How to destroy #21

bugsarekillingme opened this issue Mar 21, 2023 · 2 comments

Comments

@bugsarekillingme
Copy link

How can I properly destroy an instance of FlickityResponsive?

entity.flickity('destroy'); doesn't work.

@phucbm
Copy link
Owner

phucbm commented Mar 22, 2023

Are you using jQuery? jQuery is not fully supported in FlickityResponsive. You can initialize using jQuery but for further usage, please use the vanilla JS way.

// init
jQuery('.carousel').flickityResponsive({});

// get instance
const flkty = Flickity.data( '.carousel' );

// using API
flkty.destroy();

@bugsarekillingme
Copy link
Author

@phucbm
I understand. Thank you!

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