【发布时间】:2014-05-15 14:39:27
【问题描述】:
在页面加载时,计时器会启动,但每次发生触摸事件时都会重置。但是,当我滚动浏览我的 <select> 以查看每个 <option> 时,当我滑动向下滚动列表时,计时器不会重置。
idleTimer = null;
idleState = false;
idleWait = 10000;
$('*').bind('touchstart mousemove keydown onscroll scroll touchmove touchend touchcancel touchleave touch', function () {
clearTimeout(idleTimer);
if (idleState == true) {}
idleState = false;
idleTimer = setTimeout(function () {
location.reload();
idleState = true; }, idleWait);
});
我也试过这些:
$('#the-list').bind(...)
$(document).bind(...)
<select> 是否需要不同的触摸事件?由于这是在 iPad 上运行的,因此本机操作系统是否有可能将列表包装在我不知道的东西中?
【问题讨论】:
标签: javascript jquery html ios ipad