diff options
author | Rob Loach <robloach@gmail.com> | 2014-10-08 20:25:49 -0400 |
---|---|---|
committer | Rob Loach <robloach@gmail.com> | 2014-10-08 20:25:49 -0400 |
commit | 2f92d9eace2ca4fb9d49b8e91e3ec56cd1d7c259 (patch) | |
tree | 3c18d23690cd17cb7fc4e6a3ab0dd690f413d182 | |
parent | 9a49c9221b2f298386c3874789e6a7951cfd15cf (diff) | |
download | jquery-once-2f92d9eace2ca4fb9d49b8e91e3ec56cd1d7c259.zip jquery-once-2f92d9eace2ca4fb9d49b8e91e3ec56cd1d7c259.tar.gz jquery-once-2f92d9eace2ca4fb9d49b8e91e3ec56cd1d7c259.tar.bz2 |
Update documentation
-rw-r--r-- | jquery.once.js | 23 | ||||
-rw-r--r-- | package.json | 4 |
2 files changed, 21 insertions, 6 deletions
diff --git a/jquery.once.js b/jquery.once.js index 98f9b24..d331e44 100644 --- a/jquery.once.js +++ b/jquery.once.js @@ -1,5 +1,5 @@ /*! - * jQuery Once 2.0.0-alpha.6 + * jQuery Once 2.0.0-alpha.8 * http://github.com/robloach/jquery-once * * Dual licensed under the MIT and GPL licenses: @@ -7,13 +7,25 @@ * http://www.gnu.org/licenses/gpl.html */ +/** + * Universal Module Definition + * + * jQuery is a dependency, so we wrap the code with a UMD pattern in order to + * allow loading jQuery and jQuery Once through a module definition like + * CommonJS, AMD, or otherwise. + * + * @see {@link http://github.com/umdjs/umd} + */ (function (factory) { "use strict"; if (typeof exports === 'object') { + // CommonJS factory(require('jquery')); } else if (typeof define === 'function' && define.amd) { + // AMD define(['jquery'], factory); } else { + // Global object factory(jQuery); } }(function ($) { @@ -40,9 +52,10 @@ * * @see removeOnce * @see findOnce + * @this jQuery * - * @public * @global + * @public */ $.fn.once = function (id) { // Build the name for the data identifier. Generate a new unique id if the @@ -74,9 +87,10 @@ * }); * * @see once + * @this jQuery * - * @public * @global + * @public */ $.fn.removeOnce = function (id) { // Filter through the elements to find the once'd elements. @@ -101,9 +115,10 @@ * }); * * @see once + * @this jQuery * - * @public * @global + * @public */ $.fn.findOnce = function (id) { // Filter the elements by which do have the data. diff --git a/package.json b/package.json index 22c47cc..ae3dad0 100644 --- a/package.json +++ b/package.json @@ -59,6 +59,6 @@ "test": "grunt jshint qunit", "projectz": "node_modules/.bin/projectz compile", "release": "grunt release", - "jsdoc": "npm install jsdoc && node_modules/.bin/jsdoc jquery.once.js" + "jsdoc": "jsdoc jquery.once.js README.md" } -}
\ No newline at end of file +} |