I have used the flickity for product image slider and i want to remove the main slider mages to remove on certain condition.
i have used the remove method in another file.
var elem = document.querySelector('.carousel.product__image-slider');
var flkty = new Flickity(elem, {
contain: true,
imagesLoaded: true,
lazyLoad: 1,
wrapAround: true,
pageDots: false,{% if product.images.size < 2 %}
prevNextButtons : false,{% endif %}adaptiveHeight: true
});
console.log("check product main Slider:", flkty);
var elemThumbnail = document.querySelector('.carousel.product__image-thumbnail');
var flktyB = new Flickity(elemThumbnail, {
asNavFor: '.carousel.product__image-slider',
contain: true,
imagesLoaded: true,
lazyLoad: 7,
pageDots: false,
prevNextButtons: false
});
flkty.remove(flkty.cells)
I have used the flickity for product image slider and i want to remove the main slider mages to remove on certain condition. i have used the remove method in another file.