Nicholas C. Zakas![]()
Featured ItemThe idle timer aims to determine when the user is idle (not interacting with the page) so that you can respond appropriately. This version is a fork of the version described in my blog post, Detecting if the user is idle with JavaScript and YUI 3.
YUI({
modules: {
'gallery-idletimer': {
fullpath: 'http://yui.yahooapis.com/gallery-2009.10.28-14/build/gallery-idletimer/gallery-idletimer-min.js',
requires: ['event','event-custom'],
optional: [],
supersedes: []
}
}
}).use('gallery-idletimer', function(Y) {
Y.IdleTimer.subscribe("idle", function(){
//handle when the user becomes idle
});
Y.IdleTimer.subscribe("active", function(){
//handle when the user becomes active
});
//start the timer with a default timeout of 30s
Y.IdleTimer.start();
});No forum posts for this module.
© 2010 YUI Library - Site Credits