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

Gallery

Modules

  • Home
  • Featured
  • Popular
  • New
  • All

Documentation

  • FAQ
  • Developer FAQ
  • Developer Guide
  • Module Setup

Tag Cloud

solmsted node animation css apipkin yql model satyam event table lsmith async liferay form caridy greghinch widget davglass foxxtrot ericf nzakas datatable jafl io plugin

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
    + 3 -

    Nicholas C. Zakas

    YUI Developer

    See 7 more by this user.

    Featured Item

    Created: 10/27/09
    Last CDN Push: 08/3/11
    Build Tag: gallery-2011.08.03-21-18
    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-2011.08.03-21-18'
    }).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

    © 2006-2011 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