YUILibrary - Open source JavaScript and CSS for building richly interactive software.
Fork YUI on GitHub
  • Home
  • Gallery
  • Forums
  • YUI 2
  • YUI 3
  • YUICompressor
  • YUIDoc
  • More
  • Gallery Forums
  • Gallery Stats
  • Gallery Calendar
  • Register
  • Login

Modules

  • Home
  • Featured
  • Popular
  • New
  • All

Documentation

  • FAQ
  • Developer FAQ
  • Developer Guide
  • Module Setup

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)

    Last Updated: 10/28/09
    + 1 -

    Nicholas C. Zakas

    YUI Developer

    See 1 more by this user.

    Featured Item

    Created: 10/27/09
    Last CDN Push: 10/28/09
    Build Tag: gallery-2009.10.28-14
    Project: YUI 3
    License: YUI BSD
    YUI Version: 3.0.0
    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:
    • idle
    • nzakas
    • timer
    • Download
    • Docs
    • Homepage
    • Bugs
    • Source
    • Example
    • Forum
    • History

    Code Sample

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

    Forum Posts

    No forum posts for this module.

    YUI Projects
    • All YUI Downloads
    • YUI 2
    • YUI 3
    • YUIDoc
    • YUICompressor
    • YUILibrary.com
    • YUI Build Tool
    • YUI PHP Loader
    Pages & Links
    • All YUI Downloads
    • Git FAQ
    • Graded Browser Support
    • Contribute to YUI
    • Forum Stats
    • Gallery Stats
    • YUI Calendar
    Contribute
    • Submit a Bug
    • Request a Feature
    • Write Code
    • Meet the Team
    Follow YUI
    • on GitHub
    • on Twitter
    • on FriendFeed
    • on Facebook
    • on IRC
    • YUI Blog
    • YUI Theater
    • YUI Forums

    © 2010 YUI Library - Site Credits