Deejpake
Deejpake

Reputation: 456

Get Flickity instance from slider initialized in JS

I'm trying to access a Flickity instance with JS that has already been initialized in other JS code which I don't have access to. I have tried using Flickity.data('.slider'), as well as just creating a new Flickity instance with new Flickity('.slider'). Flickity.data returns undefined, and creating a new instance entirely returns a flickity object, but it doesn't actually correspond to the existing slider. I know neither of these approaches are supposed to work in this case, but is there any way to do this or is it not possible?

Upvotes: 3

Views: 138

Answers (0)

Related Questions