Jquery-idleTimeout - Demo Page - by JillElaine

GitHub Project Page - https://github.com/JillElaine/jquery-idleTimeout

To see the 'idle timeout' functionality, do not press any keys, click your mouse or scroll your mousewheel for 15 seconds.

GitHub Wiki Page - https://github.com/JillElaine/jquery-idleTimeout/wiki

Read the Wiki for more information!

Functions across multiple windows and tabs within the same domain

Try it! Click here to open another browser window/tab of this page.

Requirements

I shake when activity is detected.

Functionality & Features

Try it! Click here to open another browser window/tab of this page and then try the two 'Logout' buttons below.

Your Site's Logout Button - Configuration

    

If user voluntarily logs out of your site with your site's 'Logout' button (instead of timing out), you can force all 'same domain' windows & tabs to also log out too! Use this small snippet of code, $.fn.idleTimeout().logout();, on the 'onclick' function of your 'Logout' button.

Example Logout Button

	<input type="button" value="Logout All Windows/Tabs" onclick="$.fn.idleTimeout().logout();" title="This button will logout ALL open 'same domain' Windows and Tabs" class="button logoutall float_left" />
	

The Demo Runtime Configuration

The Demo Runtime Configuration Script

<script type="text/javascript" charset="utf-8">
  $(document).ready(function () {
    $(document).idleTimeout({
      redirectUrl: 'https://github.com/JillElaine/jquery-idleTimeout', // redirect to this url
      idleTimeLimit: 15, // 15 seconds
      activityEvents: 'click keypress scroll wheel mousewheel', // separate each event with a space
      dialogDisplayLimit: 30, // Time to display the warning dialog before logout (and optional callback) in seconds
      sessionKeepAliveTimer: false // Set to false to disable pings.
    });
  });
</script>