【发布时间】:2014-06-19 22:48:13
【问题描述】:
我正在尝试使用 JQuery mobile 检测滚动启动,如果我使用以下它可以工作:
$(document).bind("scrollstart", function() {
console.log("scroll start detected");
});
但是,每次滚动整个页面时都会记录。我只想检测页面内容上的滚动,而不是整个页面(文档)滚动时。
我尝试过如下各种尝试:
$("#myContent").bind("scrollstart", function() {
console.log("scroll start detected");
});
$("#myPage").bind("scrollstart", function() {
console.log("scroll start detected");
});
但除了使用文档外,我尝试的任何方法似乎都不起作用。是否可以在文档以外的任何内容上检测到滚动启动?
【问题讨论】:
标签: jquery jquery-mobile scroll document domdocument