flickity icon indicating copy to clipboard operation
flickity copied to clipboard

None of the images are displaying but they are loading in the dom

Open thegrid22593 opened this issue 11 years ago • 2 comments

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; ?>

thegrid22593 avatar Sep 22 '15 05:09 thegrid22593

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.

desandro avatar Sep 22 '15 12:09 desandro

Hello! Was this problem solved? Because I have the same trouble and I can't solve it.

kremnik avatar Jan 07 '17 17:01 kremnik