Are there any javascript/jQuery events that are like an “onmousestop” or any events equivalent to “onmousewheel” for an optical mouse and/or touchpad?

て烟熏妆下的殇ゞ 提交于 2019-12-06 15:51:51

The mousemove event is not triggered unless the mouse actually moves

The mousemove event is fired when a pointing device (usually a mouse) is moved while over an element

so simply

var timer;

$(document).on('mousemove', function() {
    clearTimeout(timer);

    timer = setTimeout(function() {
        logout();
    }, 720000);
});

FIDDLE

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!