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.
<script src="http://yui.yahooapis.com/3.1.0/build/yui/yui-min.js"></script>YUI({
//Last Gallery Build of this module
gallery: 'gallery-2009.10.28-14'
}).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();
});| Subject | Author | Date |
|---|---|---|
| Detecting keyboard action | Marc | 06/26/10 |
| Re: Detecting keyboard action | Caridy Patino | 06/27/10 |
© 2010 YUI Library - Site Credits