metafizzy / metafizzy/flickity

Cannot call jQuery .flickity method inside ready.flickity event

Open
#964 4 comments 2 reactions 0 assignees View on GitHub
Dominant language
JavaScript
Stars
7.6k
Forks
593
PR merge metrics
No merged PRs in 30d

Description

I need to remove a certain slide on mobile devices. I'm waiting for Flickity to initalize with the ready.flickity event, then using the remove method, and getting an error that Flickity is not initialized.

**Console error:**
```
flickity not initialized. Cannot call methods, i.e. $().flickity("remove")
```

**Test case:** https://codepen.io/krjo/pen/zVgaYY

Contributor guide

Open the contributing guide

Research direction

Start with the linked CodePen test case and reproduce the error around the ready.flickity event and the jQuery remove method. Trace how Flickity initialization is exposed to the jQuery method, then verify that removing a slide from the ready event no longer reports Flickity as uninitialized.

Written by the indexing model from the issue text.

Assessment

Tech stack
javascript, jquery
Domain
frontend
Issue type
Bug
Difficulty
3/5
Estimated time
1-2 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
42/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.