kombai / freewall

Freewall is a cross-browser and responsive jQuery plugin to help you create grid, image and masonry layouts for desktop, mobile, and tablet...
MIT License
1.85k stars 375 forks source link

Freewall & Infinite Loading (Overlap images when loading) #182

Open exxed opened 9 years ago

exxed commented 9 years ago

I would just like to begin by saying that Freewall is awesome and I'm having a blast with it. I'm trying to use it with an Ajax Infinite Scroll Plugin on Wordpress. It is executing very nicely however I'm having just 1 issue. When I scroll down the new images load on top (overlap) of the existing images and then appear in the right spot below the images. How do I get them to just appear at the right spot and not show while overlapping? Any help would be greatly appreciated since I've been pondering over this for a while now.

var wall = new freewall('#freewall');
// images have loaded, ini freewall
imagesLoaded( '#freewall', function() {
    wall.reset({
        selector: '.brick',
        animate: true,
        cellW: '280',
    cellH: '200',
        gutterY: 0,
        gutterX: 0,
        onResize: function() {
        wall.fitWidth();
        }
    });
    wall.fitWidth();
    // for scroll bar appear;
    $(window).trigger("resize");
});
// infinite scrolling now...
    var ias = jQuery.ias({
    container:      '#freewall',
    item:           '.brick',
    pagination:     '.pagination',
    next:           '.next',
    delay:          0,
    negativeMargin: 0
});

// display ajax loaded images

ias.on('rendered', function(items) {
imagesLoaded( '#freewall', function() {
wall.fitWidth();

    });
    });
exxed commented 9 years ago

@kombai I could really use your help on this one please.

TuzBot commented 8 years ago

Hi @exxed and @kombai I too could do with some help with this issue.