user386430
user386430

Reputation: 4967

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

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

Upvotes: 0

Views: 57

Answers (0)

Related Questions