• Register
  • Log In
  • Home
  • Quick Start
    • Configurator
    • Download YUI 3
  • Documentation
    • User Guides
    • Examples
    • API Docs
    • Environments
    • Tutorials
  • Community
    • Gallery
    • Blog
    • Forums
    • YUI Theater
    • Calendar
  • Contribute
    • YUI on GitHub »
    • File a Ticket
    • View Tickets
    • Dashboard
  • Other Projects
    • Shifter »
    • Yogi »
    • YUI 2
    • YUI Doc »
    • YUI Test
    • YUI Website
    • YUI Compressor »
    • YUI Builder »
    • YUI PHP Loader
    • Grid Builder »
    • Skin Builder »
  • YUI
  • >
  • Community
  • >
  • Gallery

Gallery

Modules

  • Home
  • Featured
  • Popular
  • New
  • All

Documentation

  • Yogi Documentation
  • Shifter Documentation
  • Developer Guide
  • Module Setup

Tag Cloud

Context Navigation

    YUI Library is not responsible for bugs or support with this module. It is available as a free service. For support please contact the module owner with the provided links.

    Idle Timer (gallery-idletimer) on cdn

    Last Updated: 10/31/11
    + 4 -

    Nicholas C. Zakas

    YUI Developer

    See 7 more by this user.

    Featured Item

    Created: 10/27/09
    Last CDN Push: 09/12/12
    Build Tag: gallery-2012.09.12-20-02
    Project: YUI 3
    License: YUI BSD
    YUI Version: 3.4.1
    Free for use.

    The 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.

    • Tags:
    • timer
    • nzakas
    • idle
    • Download
    • Docs
    • Homepage
    • Bugs
    • Source
    • Example
    • Forum
    • History

    Code Sample

    <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();
    });

    Forum Posts

    Subject Author Date
    Detecting keyboard action Marc 06/26/10
    Re: Detecting keyboard action Caridy Patino 06/27/10
    Changing tab in Chrome triggers &quot;idle&quot; 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