Simplest and Effective jQuery Idle (Inactivity) Plugin | jquery.inactivity

JQuery is a small, mobile-friendly plugin that detects user activities (keyboard, mouse, touch, or custom events) and triggers an “inactivity” event when the user has been idle for a certain period of time.

jquery idle timeout, jquery idle session auto timeout with prompt, jquery session timeout plugin, jquery idletimeout plus example, check if user is idle jquery

Virtual Keyboard Typing Sound Built With Pure Javascript

How to make use of it:

1. Place the minified version of the Inactivity plugin after loading the newest jQuery.

<script src="/path/to/cdn/jquery.slim.min.js"></script>
<script src="/path/to/src/jquery.inactivity.min.js"></script>

2. Initialize the plugin on the entire doc.

$(document).inactivity( {
  // options here
});

3. Fire an event when a user is idle.

$(document).on("inactivity", function(){
  // do something when a user is idle
});

4. Fire an event when a user is lively.

$(document).on("activity", function(){
  // do something when a user is active
});

5. Determine whether or not to detect mouse events.

$(document).inactivity( {
  mouse: false
});

6. Determine whether or not to detect keyboard events.

$(document).inactivity( {
  keyboard: true
});

7. Determine whether or not to detect keyboard events.

$(document).inactivity( {
  touch: true
});

8. Determine whether or not to use customized events.

$(document).inactivity( {
  customEvents: "customEventName"
});

9. Determine whether to trigger only the first “activity” event.

$(document).inactivity( {
  triggerAll: false
});

Detect If The User Is Idle In jQuery, How to Detect Idle Time, jquery inactivity Plugin/Github 


See Demo And Download

Official Website(readyforaliens): Click Here

This superior jQuery/javascript plugin is developed by readyforaliens. For extra Advanced Usages, please go to the official website.

Leave a Comment