summaryrefslogtreecommitdiffstats
path: root/jquery.once.min.js
diff options
context:
space:
mode:
authorThéodore Biadala <theodore@biadala.net>2014-10-15 03:49:30 +0200
committerThéodore Biadala <theodore@biadala.net>2014-10-15 03:49:30 +0200
commit6c3c03d6c1b974c03f1276e65fc3f2bba5e4393e (patch)
treef97bc5195dcf938afcd6195d426d64ac90479f41 /jquery.once.min.js
parent57bf227077907c9358cc4e97f679585140bc91c6 (diff)
downloadjquery-once-6c3c03d6c1b974c03f1276e65fc3f2bba5e4393e.zip
jquery-once-6c3c03d6c1b974c03f1276e65fc3f2bba5e4393e.tar.gz
jquery-once-6c3c03d6c1b974c03f1276e65fc3f2bba5e4393e.tar.bz2
Remove ability to call once() without a parameter
Diffstat (limited to 'jquery.once.min.js')
-rw-r--r--jquery.once.min.js6
1 files changed, 3 insertions, 3 deletions
diff --git a/jquery.once.min.js b/jquery.once.min.js
index 5c222a8..1e29ed1 100644
--- a/jquery.once.min.js
+++ b/jquery.once.min.js
@@ -1,4 +1,4 @@
-/*! jQuery Once - v2.0.0-alpha.6 - 10/7/2014 - https://github.com/RobLoach/jquery-once
- * (c) 2014 Rob Loach (http://github.com/robloach)
+/*! jQuery Once - v2.0.0-alpha.8 - 10/15/2014 - https://github.com/RobLoach/jquery-once
+ * (c) 2014 Rob Loach (http://github.com/RobLoach)
* Licensed GPL-2.0, MIT */
-!function(a){"use strict";"object"==typeof exports?a(require("jquery")):"function"==typeof define&&define.amd?define(["jquery"],a):a(jQuery)}(function(a){"use strict";var b={},c=0;a.fn.once=function(d){"string"!=typeof d&&(d in b||(b[d]=++c),d=b[d]);var e="jquery-once-"+d;return this.filter(function(){return a(this).data(e)!==!0}).data(e,!0)},a.fn.removeOnce=function(a){return this.findOnce(a).removeData("jquery-once-"+a)},a.fn.findOnce=function(b){var c="jquery-once-"+b;return this.filter(function(){return a(this).data(c)===!0})}}); \ No newline at end of file
+!function(a){"use strict";"object"==typeof exports?a(require("jquery")):"function"==typeof define&&define.amd?define(["jquery"],a):a(jQuery)}(function(a){"use strict";a.fn.once=function(b){if(!b)throw new Error("An ID is required when calling jQuery.once()");var c="jquery-once-"+b;return this.filter(function(){return a(this).data(c)!==!0}).data(c,!0)},a.fn.removeOnce=function(a){return this.findOnce(a).removeData("jquery-once-"+a)},a.fn.findOnce=function(b){var c="jquery-once-"+b;return this.filter(function(){return a(this).data(c)===!0})}}); \ No newline at end of file