How to implement idle time out using java script function in sencha

60 Views Asked by At

Can anybody tell how to implement idle timeout using java script function in sencha touch

I have tried in sencha controller

var timeoutTime =60000;
    var timeoutTimer = setTimeout(function() { alert("dd"); }, timeoutTime);
    **$(document).ready(function() {
    $('body').bind('mousedown keydown touchstart', function(event) {**
        clearTimeout(timeoutTimer);
        timeoutTimer = setTimeout(function() { alert("dd"); }, timeoutTime);
    });
}); 

I am getting error $ in undefined

0

There are 0 best solutions below