工作,我也有类似的这种iScroll例如东西:http://cubiq.org/dropbox/iscroll4/examples/simple/iScroll scrollToElement不与jQuery Mobile的
除了我使用jQuery移动(即页眉,页脚和内容使用jQuery Mobile的设置)。除了scrollToElement之外,所有内容都运行平稳。
使用jQuery Mobile和iScroll时有没有什么办法让scrollToElement工作?
这里的iScroll剧本我目前有:
var myScroll;
function loaded() {
myScroll = new iScroll('wrapper');
}
document.addEventListener('touchmove', function (e) { e.preventDefault(); }, false);
document.addEventListener('DOMContentLoaded', function() { setTimeout(loaded, 200);}, false);
编辑:忘了提我想要实现的。在上述iScroll例子,我试图滚动到特定行。唯一的问题是,jQuery Mobile的防止scrollToElement从出于某种原因的工作。