Mootools IdleTimer

by Espen 'Rexxars' Hovlandsdal

IdleTimer?

This plugin aims to determine when the user is idle (not interacting with the page) so that you can respond appropriately. It is inspired by Nick Zakas' YUI version and Paul Irish's jQuery version.

When is this useful?

Demo

The "idle time" on the boxes below is concidered 5 seconds and is affected by
mouse movement, keyboard input, mousewheel and mouse button press.

The box to the left conciders the user to be idle after 5 seconds, while the middle box is only triggered after 30 seconds of inactivity has passed. The right box is only triggered by mouse events over that exact box, and conciders the user idle after 10 seconds of inactivity.

After 30 seconds of inactivity, a bar will appear on the top of the page, showing a common usage scenario for this class.

Idle status (5s):
Active!
0 ms
Idle status (30s):
Active!
0 ms
Separate (10s)
Active!
0 ms

Documentation

See http://github.com/rexxars/IdleTimer/blob/master/Docs/IdleTimer.md

Download

IdleTimer is available for download through the MooTools Forge and Github.