I'm using Paul Irish's idle-timer plugin available here : http://paulirish.com/2009/jquery-idletimer-plugin/ .
I want to hide some divs after 5 seconds of inactivity and show them back when user activity's catched .
Here is my code :
$(document).ready(function(){
$.idleTimer(5000);
$(document).bind("idle.idleTimer", function(){
$("#audio_container").fadeOut(1000);
$(".breadcrumb").fadeOut(1000);
});
$(document).bind("active.idleTimer", function(){
$("#audio_container").fadeIn(1000);
$(".breadcrumb").fadeIn(1000);
});
});
It works perfectly on Firefox / Safari / Mobile Safari , but I can't make it work on Chrome or IE 8 / 9 . Obviously the onmousemove event is the problem, if I unbind the onmousemove event, it works (But I need it so this is not an acceptable fix for me).
You can find an exemple here :
Best regards,
EDIT :
The mousemouve event is located in the idle-timer plugin .
$.idleTimer = function(newTimeout, elem){
// defaults that are to be stored as instance props on the elem
var idle = false, //indicates if the user is idle
enabled = true, //indicates if the idle timer is enabled
timeout = 30000, //the amount of time (ms) before the user is considered idle
events = 'mousemove keydown DOMMouseScroll mousewheel mousedown touchstart touchmove'; // activity is one of these events
if I remove the mousemove event from the plugin, it works .