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.4.1/build/yui/yui-min.js"></script>YUI({
//Last Gallery Build of this module
gallery: 'gallery-2012.09.12-20-02'
}).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 |
| Changing tab in Chrome triggers "idle" | khael | 12/6/11 |
| using both timer and idle timer | benethen | 12/19/12 |
© 2006-2013 Yahoo! Inc. All rights reserved.
All code on this site is licensed under the BSD License unless stated otherwise.
About This Site · Security Contact Info