2015-03-25 58 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」?

相關問題