metafizzy / flickity

:leaves: Touch, responsive, flickable carousels
https://flickity.metafizzy.co
7.5k stars 604 forks source link

sync: $elements instead of sync: '.is-style-carousel__elements' #1292

Open infosion opened 8 months ago

infosion commented 8 months ago

I am trying to synchronize two Carousels, but I would like to select an object instead of a class. I wonder if this is possible?

  var tabs = $(this).find('.is-style-carousel__tabs');
  var elements = $(this).find('.is-style-carousel__elements');

  $(tabs).flickity({
   // sync: $elements
    sync: '.is-style-carousel__elements',
  }); 

  $(elements).flickity({
  });