jQuery Idle Timer Plugin
Demo
https://thorst.github.io/jquery-idletimer/index.html
Download
Purpose
Fires a custom event when the user is "idle". Idle is defined by not...
- moving the mouse
- scrolling the mouse wheel
- using the keyboard
Usage
There are two ways to instantiate. Either statically, or on an element. Element bound timers
will only watch for events inside of them. You may just want page-level activity, in which
case you may set up your timers on document
, document.documentElement
, and document.body
.
Instantiate returns jQuery for chaining.
;
Options
You can configure the settings several ways
;
Events
When a users state changes a custom events get triggered. There are several parameters passed to your handler for you to use.
;
Methods
There are several methods to invoke
;
Using multiple idle monitors
When using multiple idle monitors on the same element, a unique id needs be used for each one.
Options
;
Methods
;
Events
;
Pre-Req
jQuery 1.7 (tested with 1.11.0)
Intended Browser Support
Desktop
-
=IE8
- Firefox n-1
- Chrome n-1
- Safari n
Mobile
- iOS n-1
- Android (version?)
- Windows Phone IEMobile/10.0
Links
- jQuery plugin repo listing
- cdn
- nuget - coming soon
- Eric Hynds Idle Timeout plugin (note we have similar functionality here)
Playground
Version History
Version | Author | Released | Links |
---|---|---|---|
1.0.0 | Todd Horst | 03/10/2014 | Change Log - Breaking Changes |
0.9.3 | Mike Sherov | 08/04/2013 |
Author History
- Nicholas C. Zakas (yui Version) idleTimer Blog | Github Profile | Github
- Paul Irish (initial jQuery Version) idleTimer Blog | Github Profile | Github
- Mike Sherov (transfered from Paul) Github Profile
- Todd Horst (transfered from Mike) Github Profile
Bug?
Please create a fiddle and submit a ticket