2015-03-25 57 views
0

这是我的website。我想做一个瀑布和无限滚动网站,它在PC上工作正常,但无限加载不工作在我的iPhone 6 Chrome上。为什么?为什么这个代码不工作? (在我的iphone 6上,铬)

而且有我的代码:直到你抬起手指和停止滚动

<div id="container"> </div> 
<script type="text/x-handlebars-template" id="waterfall-tpl"> 
{{#result}} 
    <div class="item"> 
     <img src="{{image}}" width="{{width}}" height="{{width}}" /> 
     <!--<p>{{title}}</p> 
     <p>{{description}}</p> 
     <span style="color:gray;text-decoration:line-through;">{{price_standard}}</span>&nbsp;&nbsp;<span style="color:darkred;">{{price_promo}}</span>--> 
    </div> 
{{/result}} 
</script> 
<script src="http://code.jquery.com/jquery-latest.js"></script> 
<script src="js/libs/handlebars/handlebars.js"></script> 
<script src="js/libs/jquery.easing.js"></script> 
<script src="js/waterfall.js"></script> 
<script> 
$('#container').waterfall({ 
    itemCls: 'item', 
    colWidth: 222, 
    gutterWidth: 15, 
    gutterHeight: 25, 
    checkImagesLoaded: false, 
    minCol: 1, 
    maxCol: 6, 
    isAnimated: true, 
    animationOptions: { 
    }, 
    path: function (page) { 
     return 'data/data' + page + '.json'; 
    }  
}); 
</script> 

回答

2

iOS不运行滚动事件。如果您将手指放在底部,结果会加载,但在这样做之前,无限滚动代码永远不会运行。不幸的是没有办法解决这个问题。也许为ios用户显示一条消息,比如“release to load more”?

相关问题