0
我無法檢測頁面是否滾動或與jQuery的移動。無論如何,Scrolltop
始終返回0。檢測JQuery的移動滾動
<script>
var interval = setInterval(function() {
alert($("#articlecontent").scrollTop());
//alert($(window).scrollTop());
//alert($("#maindiv").scrollTop());
}
}, 3000);
</script>
<div data-role="page" id="maindiv">
<div class="ui-bar ui-bar-b">
</div>
<div id='articlecontent' data-role="content" data-iscroll>
sldfjlkjsl lksjd kls df hjks djkh sdjfkh sjkf
jksd jkhsdf jkhsd hjwiuhhfg skd jkshd fkj fkjsg kjhsdkjf
sldfjlkjsl lksjd kls df hjks djkh sdjfkh sjkf
jksd jkhsdf jkhsd hjwiuhhfg skd jkshd fkj fkjsg kjhsdkjf
sldfjlkjsl lksjd kls df hjks djkh sdjfkh sjkf
jksd jkhsdf jkhsd hjwiuhhfg skd jkshd fkj fkjsg kjhsdkjf
</div>
<div data-role="footer" data-id="foo1">
</div>
</div>
你有沒有解決過這個問題? –