We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
2 parents 953e434 + 3387d36 commit f58a55bCopy full SHA for f58a55b
1 file changed
src/jTimeout.js
@@ -180,7 +180,7 @@
180
timeout.setMouseTimeout(window.setTimeout(function ()
181
{
182
//on mouse move
183
- $('body').on('mousemove', function ()
+ $('body').on('mousemove.jTimeout', function ()
184
185
if (!timeout.mouseMoved && timeout.resetOnAlert())
186
@@ -245,6 +245,16 @@
245
timeout.stopPriorCountdown();
246
timeout.hideCountdownAlert();
247
}
248
+ },
249
+ /* When you are all done, destroy all the timers -- or just let the user navigate away from the page. */
250
+ destructor: function () {
251
+ timeout.stopFlashing();
252
+ timeout.stopActivityMonitoring();
253
+ delete timeout.options.onSessionExtended;
254
+ delete timeout.countdown;
255
+
256
+ // Remove the event handlers
257
+ $('body').off('mousemove.jTimeout');
258
259
};
260
0 commit comments