繁体   English   中英

iscroll无法自动运行

[英]The iscroll doesn't work automatically

我正在尝试在ipad中滚动div。 我使用iscroll。 像这样:

$(document).on("pagecreate",function(event){
     var myScroll = new IScroll('#devicesContent',  {
         click:true
     });
});

但是我看到的很奇怪:它不会自动运行。 如果我在横向上打开它,则不会滚动。 如果更改方向然后滚动,或者在纵向打开它并且需要更改横向的方向然后滚动。 我想念什么?

$(document).on("pagecreate", function(event){
    var myScroll = new IScroll('#devicesContent', { 
        eventPassthrough: true, // add this
        click:true,
        scrollX: true, 
        scrollY: false
    });
});

看来问题出在您的pagecreate事件上。 尝试使用“页面显示”。

暂无
暂无

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM