Module: inactivity

Detection of window focus

Since:
  • 3.1.0

Source:

CSS classes


inactive
inactive-$timeLimitName$

Methods


JS.Responsive.getInactiveTimeLimit()

Returns time limit object which is plain object with limit property with seconds for time limit askedvia optional name parameter, if no name is provided, the default 'inactive' object will be returned.

Since:
  • 3.1.0

Source:
Returns:
Type:
Object

JS.Responsive.removeInactiveTimeLimit()

Deletes timeLimit object based on optional name parameter, if no name is provided, the default 'inactive' object will be deleted.

Since:
  • 3.1.0

Source:

JS.Responsive.setInactiveTimeLimit(timeLimit [, name], callback)

Set time limit in seconds for considering window as inactive and optionally applying name of a limit if provided.

Parameters:
NameTypeArgumentDefaultDescription
timeLimitNumber

in seconds.

nameString<optional>
inactivity

name of the limit, will be applied as className to window when user reaches thetime limit of inactivity. NOTE: The className will be applied with 'inactive-' prefix!, if no name provided, defaultclassName 'inactive' will be applied instead.

callbackfunction

called when timeLimit is reached, callback(timeLimit, name)

Since:
  • 3.1.0

Source:

Events


inactive
{Number} time in seconds of inactivity