flickity icon indicating copy to clipboard operation
flickity copied to clipboard

display none on flickity-slides not working as expected

Open neuedeutsche opened this issue 6 years ago ā€¢ 5 comments

display none on flickity-slides doesnt make them none-items. shouldnt this be taken in account?

neuedeutsche avatar Jan 27 '19 09:01 neuedeutsche

Thanks for this feature request. Add a šŸ‘ reaction to this issue if you would like to see this feature added. Do not add +1 comments ā€” They will be deleted.


One way to address this issue is to use cellSelector for the visible cells

<div class="carousel-cell is-visible">...</div>
<div class="carousel-cell is-visible">...</div>
<div class="carousel-cell is-hidden">...</div>
<div class="carousel-cell is-visible">...</div>
$('.carousel').flickity({
  cellSelector: '.carousel-cell.is-visible'
});

desandro avatar Jan 28 '19 14:01 desandro

duuuh, yea that actually does not sound stupid šŸ‘ thanks!

neuedeutsche avatar Jan 29 '19 14:01 neuedeutsche

I add that iā€™d love to see a $('.carousel').flickity('hide_cells',$('.cells_to_hide')) / $('.carousel').flickity('display_cells',$('.cells_to_display'))

contreforme avatar Mar 07 '19 10:03 contreforme

Hi. I would like to know if adding the .is-visible and .is-hidden dynamically still makes the added classes visible to flickity. I dynamically add using $('[data-thumbnail-color],[data-image-color]').removeClass('is-visible').removeClass('is-hidden'); to the list items that respectively need to be hidden or visible; buy when add cellSelector: '.carousel-cell.is-visible'; the carousel disappears.

guydrums avatar Jul 22 '20 17:07 guydrums

Thanks for this feature request. Add a šŸ‘ reaction to this issue if you would like to see this feature added. Do not add +1 comments ā€” They will be deleted.

One way to address this issue is to use cellSelector for the visible cells

<div class="carousel-cell is-visible">...</div>
<div class="carousel-cell is-visible">...</div>
<div class="carousel-cell is-hidden">...</div>
<div class="carousel-cell is-visible">...</div>
$('.carousel').flickity({
  cellSelector: '.carousel-cell.is-visible'
});

Perfect!

haroldao avatar Oct 23 '23 21:10 haroldao