方向更改时的iscroll问题

时间:2011-12-21 13:17:29

标签: jquery iscroll appmobi

当我将orienatation从纵向更改为横向时,我遇到了iScroll的问题。它正在使用AppMobi XDK,但在iPhone上,它无法正常渲染。我试图捕获orientationchange事件,并使用不同的超时值调用iScroll的刷新方法,但没有运气。

// My code sample for the orientation change event
document.addEventListener("appMobi.device.orientation.change", orientationChange, false);
function orientationChange(){       
    setTimeout(function () { myScroll.refresh() }, 0);  
    //alert("Orientation Change");
}

有人可以帮忙吗?

1 个答案:

答案 0 :(得分:0)

您可以尝试调整事件大小

window.addEventListener("resize", function() {
// Get screen size (inner/outerWidth, inner/outerHeight)
}, false);
相关问题