summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorRob Loach <robloach@gmail.com>2014-10-16 09:21:46 -0400
committerRob Loach <robloach@gmail.com>2014-10-16 09:21:46 -0400
commita4bbcbb0d95de9df4e6e868e582f87df31b82a9e (patch)
treefc4eb2ac6d85616895d1e316a984c1218ae25645
parent09b340240d294f923ae2d0e90ac235830a0e71b0 (diff)
downloadjquery-once-a4bbcbb0d95de9df4e6e868e582f87df31b82a9e.zip
jquery-once-a4bbcbb0d95de9df4e6e868e582f87df31b82a9e.tar.gz
jquery-once-a4bbcbb0d95de9df4e6e868e582f87df31b82a9e.tar.bz2
Update to 2.0.0-alpha.92.0.0-alpha.9
-rw-r--r--HISTORY.md4
-rw-r--r--README.md12
-rw-r--r--bower.json4
-rw-r--r--component.json2
-rw-r--r--jquery.once.js2
-rw-r--r--jquery.once.min.js2
-rw-r--r--once.jquery.json2
-rw-r--r--package.json2
8 files changed, 12 insertions, 18 deletions
diff --git a/HISTORY.md b/HISTORY.md
index d29067b..d7c5d5a 100644
--- a/HISTORY.md
+++ b/HISTORY.md
@@ -1,5 +1,9 @@
# History
+## v2.0.0-alpha.9 October 16, 2014
+- `id` parameter of `.once()` now a required parameter
+ - From [@theodoreb](http://github.com/theodoreb)
+
## v2.0.0-alpha.8 October 9, 2014
- Update documentation
- Fix whitespace
diff --git a/README.md b/README.md
index f091425..e1b04e6 100644
--- a/README.md
+++ b/README.md
@@ -39,7 +39,7 @@ be used to ensure that a function is only applied once to an element.
### [Browserify](http://browserify.org/)
- Use: `require('jquery-once')`
- Install: `npm install --save jquery-once`
-- CDN URL: `//wzrd.in/bundle/jquery-once@2.0.0-alpha.8`
+- CDN URL: `//wzrd.in/bundle/jquery-once@2.0.0-alpha.9`
### [Ender](http://ender.jit.su/)
- Use: `require('jquery-once')`
@@ -75,16 +75,6 @@ $('div.calendar').once('calendar').click(function() {
});
```
-It is also possible to use `.once()` without supplying a name:
-
-``` javascript
-$('div.calendar').once().each(function() {
- // This function is only executed once for each div, even if this
- // code segment is executed repeatedly. Other scripts can't refer
- // to this `once` method. The once data used to store execution are
- // in the form "jquery-once-1", "jquery-once-2", etc.
-});
-```
### `.findOnce()`
diff --git a/bower.json b/bower.json
index 65a95de..c311d77 100644
--- a/bower.json
+++ b/bower.json
@@ -2,7 +2,7 @@
"name": "jquery-once",
"homepage": "http://github.com/robloach/jquery-once",
"description": "jQuery Once",
- "version": "2.0.0-alpha.8",
+ "version": "2.0.0-alpha.9",
"main": "jquery.once.js",
"ignore": [
"*.json",
@@ -25,4 +25,4 @@
"grunt-eslint": "~1.1.0",
"projectz": "~0.3.15"
}
-}
+} \ No newline at end of file
diff --git a/component.json b/component.json
index d5bfe6e..e952219 100644
--- a/component.json
+++ b/component.json
@@ -4,7 +4,7 @@
"homepage": "http://github.com/robloach/jquery-once",
"description": "Act on jQuery elements only once.",
"license": "GPL-2.0",
- "version": "2.0.0-alpha.8",
+ "version": "2.0.0-alpha.9",
"keywords": [
"jquery"
],
diff --git a/jquery.once.js b/jquery.once.js
index 5469ab7..63aeb8e 100644
--- a/jquery.once.js
+++ b/jquery.once.js
@@ -34,7 +34,7 @@
/**
* Filter elements by whether they have not yet been processed.
*
- * @param {string} [id]
+ * @param {string} id
* The data id used to determine whether the given elements have already
* been processed or not.
*
diff --git a/jquery.once.min.js b/jquery.once.min.js
index 1e29ed1..45302c6 100644
--- a/jquery.once.min.js
+++ b/jquery.once.min.js
@@ -1,4 +1,4 @@
-/*! jQuery Once - v2.0.0-alpha.8 - 10/15/2014 - https://github.com/RobLoach/jquery-once
+/*! jQuery Once - v2.0.0-alpha.9 - 10/16/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";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
diff --git a/once.jquery.json b/once.jquery.json
index 3d58d59..d562ac2 100644
--- a/once.jquery.json
+++ b/once.jquery.json
@@ -6,7 +6,7 @@
"jquery",
"once"
],
- "version": "2.0.0-alpha.8",
+ "version": "2.0.0-alpha.9",
"author": {
"name": "Rob Loach",
"url": "http://robloach.net"
diff --git a/package.json b/package.json
index 1dcf8a4..a7aef9b 100644
--- a/package.json
+++ b/package.json
@@ -2,7 +2,7 @@
"name": "jquery-once",
"title": "jQuery Once",
"description": "Act on jQuery elements only once.",
- "version": "2.0.0-alpha.8",
+ "version": "2.0.0-alpha.9",
"keywords": [
"jquery"
],