Skip to content

Commit 52c6fa6

Browse files
committed
Added destroy method - thanks Caleb Anderson
1 parent f58a55b commit 52c6fa6

File tree

6 files changed

+5
-4
lines changed

6 files changed

+5
-4
lines changed

LICENSE

100644100755
File mode changed.

dist/jTimeout.min.js

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

example.png

100644100755
File mode changed.

index.html

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -139,6 +139,7 @@ <h4>This cross-tab jQuery plugin keeps track of time and let's a user know befor
139139
$.jTimeout().setExpiration(1000); //will set the expiration to 1000 seconds in the future
140140
$.jTimeout().getExpiration(); //gets the expiration date string
141141
$.jTimeout().getSecondsTillExpiration(); //gets the number of seconds until the session expires
142+
$.jTimeout().destroy(); //detaches event handlers and stops flashing (if applicable)
142143
});</pre>
143144
</div>
144145
</div>

package.json

100644100755
Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "jtimeout",
3-
"version": "3.0.3",
3+
"version": "3.1.0",
44
"description": "jQuery session timeout handler",
55
"repository": {
66
"type": "git",

src/jTimeout.js

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -246,8 +246,8 @@
246246
timeout.hideCountdownAlert();
247247
}
248248
},
249-
/* When you are all done, destroy all the timers -- or just let the user navigate away from the page. */
250-
destructor: function () {
249+
/* Kill the plugin by removing all event handlers and current activities (like flashing) */
250+
destroy: function () {
251251
timeout.stopFlashing();
252252
timeout.stopActivityMonitoring();
253253
delete timeout.options.onSessionExtended;

0 commit comments

Comments
 (0)