flickity
flickity copied to clipboard
matchmedia support?
Does flickity 3 offer matchmedia support? I saw an old v2 demo using jquery on Codepen. But, what about v3 with vanilla js?
Am I doing something wrong?
const options = {
cellAlign: 'left',
contain: true,
pageDots: false,
wrapAround: false,
groupCells: 1
};
const flkty = new Flickity( '.carousel',
options);
const mediaQueryList = window.matchMedia('(min-width: 600px)');
if(mediaQueryList.matches) {
options.prevNextButtons = false;
}