Created
December 28, 2019 02:10
-
-
Save wplit/662dc9f23b170f3b4ed6fd92a00c1476 to your computer and use it in GitHub Desktop.
Carousel/Slider from WordPress Gallery using Flickity (updated flickity-init.js)
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| (function ($) { | |
| $('.gallery-carousel .blocks-gallery-grid').flickity({ | |
| // At the end of cells, wrap-around to the other end for infinite scrolling. | |
| wrapAround: true, | |
| // Align cells within the carousel element. | |
| cellAlign: 'left', | |
| // Groups cells together in slides. Flicking, page dots, and previous/next buttons are mapped to group slides, not individual cells. is-selected class is added to the multiple cells in the selected slide. | |
| // if set to a number, group cells by that number. | |
| groupCells: 2 | |
| }); | |
| })(jQuery); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment