Jquery Isotope - 网格项目在滚动时摇晃或移动 - 仅限IE

时间:2016-12-21 19:23:38

标签: jquery isotope

我有一个问题,在IE11中查看我的jquery同位素网格时,网格项目向下移动一会儿,同时向下滚动页面。您可以在此处查看页面:dhm.970design.com/portfolio /

我的同位素JS:

>>> input = ((i,j,k) for i,j,k in itertools.combinations_with_replacement(xrange(dim3), 3) if i < dim1 and j < dim2)
>>> import numpy as np
>>> results = np.empty(dim1*dim2*dim3)
>>> res = p.imap(fun, input)
>>> for i,r in enumerate(res):
...   results[i] = r
... 
>>> results.shape = (dim1,dim2,dim3)

我的CSS:

////////// Isotope
    var $grid = $('.iso-grid').isotope({
        itemSelector: '.grid-item',
        layoutMode : 'fitRows',
        percentPosition: true,
        onLayout: function() {
            $(window).trigger("scroll");
        },
        fitRows: {
            gutter: 0
        }
    });

    $window = $(window);

    $grid.isotope('layout');

    $window.scroll($.throttle( 250, function() {
        $grid.isotope('layout');
    }));

    //force refresh as stuff loads
    $window.load(function() {
        var cnt = 1;
        var intervalIDc = window.setInterval(function() {
            $grid.isotope('layout');
            cnt++;
            if (cnt > 10) {
                window.clearInterval(intervalIDc);
            }
        }, 150);
    });

0 个答案:

没有答案