使用Isotope预填充的JQuery Infinite Scrolling在IE8中不起作用

时间:2013-05-12 17:54:48

标签: jquery jquery-isotope

我正在使用预填充选项JQuery Infinite ScrollingJQuery Isotope。除IE8外,它在所有主流浏览器中都能正常工作。在IE8中,只加载了第一批元素,仅此而已。

我需要做什么才能在IE8中预填充?

这是我的JavaScript:

var $container = $('#container');

$container.imagesLoaded(function(){
    $container.isotope({
        itemSelector : '.item',
        animationEngine: 'best-available',
        masonry: {
            columnWidth: 150
        }
    });
});


$container.infinitescroll({
    prefill: true,
    animate : false,
    bufferPx : 40, 
    binder: $(window), 
    navSelector  : '#page-nav',    // selector for the paged navigation 
    nextSelector : '#next-page',  // selector for the NEXT link (to page 2)
    itemSelector : '.item',     // selector for all items you'll retrieve
    loading: {
        finishedMsg: 'No more pages to load.',
        msgText: "<em>Loading ...</em>",
        img: 'http://i.imgur.com/qkKy8.gif'
        }
    },
    // call Isotope as a callback
    function(newElements, data, url) {


        // hide new items while they are loading
        var $newElems = $( newElements ).css({ opacity: 0 });
        // ensure that images load before adding to Isotope layout
        $newElems.imagesLoaded(function(){
            // show elems now they're ready
            $newElems.animate({ opacity: 1 });
            $container.isotope( 'appended', $( newElements ) );

        });

    }
);   

我的Css:

.item {
  margin: 5px;
  position: absolute;
}

0 个答案:

没有答案