flickity
flickity copied to clipboard
None of the images are displaying but they are loading in the dom
I am having an issue with the images displaying.
I have a full width image slider working on my home page and I am now trying to add a second gallery slider on another page within the site. The images in this slider are not displaying at all but they show up in the DOM and sometimes flash and disappear on refresh of the page. Any help would be awesome! :D
// Home Page Slider (works fine)
var flkty = new Flickity( '.main-gallery', {
cellAlign: 'left',
contain: true,
wrapAround: true,
prevNextButtons: false,
imagesLoaded: true,
autoPlay: 4000,
draggable: false,
freeScroll: true,
pageDots: false
});
// Another page gallery slider (not displaying images)
var flktyPerformance = new Flickity( '.performance-gallery', {
cellAlign: 'left',
wrapAround: true,
autoPlay: 4000,
draggable: false,
pageDots: true
});
<?php
$images = get_field('image_gallery');
if ( $images ): ?>
<div class="performance-gallery">
<?php foreach ( $images as $image ): ?>
<div class="gallery-cell">
<img src="<?php echo $image['url'];?>" alt="<?php echo $image['alt'];?>" />
</div>
<?php endforeach; ?>
</div>
<?php endif; ?>
I'm sorry to see you're having trouble with Flickity. Could you provide a reduced test case? See Submitting Issues in the contributing guidelines.
Hello! Was this problem solved? Because I have the same trouble and I can't solve it.