Commit 6d0a1c5d authored by webchick's avatar webchick

Issue #2075199 by RobLoach: Update jQuery Once to 1.2.3.

parent 9436f98c
/**
* jQuery Once Plugin v1.2
* http://plugins.jquery.com/project/once
* jQuery Once Plugin 1.2.3
* http://plugins.jquery.com/once/
*
* Dual licensed under the MIT and GPL licenses:
* http://www.opensource.org/licenses/mit-license.php
* http://www.gnu.org/licenses/gpl.html
*/
(function ($) {
(function (factory) {
"use strict";
if (typeof exports === 'object') {
factory(require('jquery'));
} else if (typeof define === 'function' && define.amd) {
define(['jquery'], factory);
} else {
factory(jQuery);
}
}(function ($) {
"use strict";
var cache = {}, uuid = 0;
/**
......@@ -35,9 +44,11 @@
* logic as $.each(). Returning true will continue to the next matched
* element in the set, while returning false will entirely break the
* iteration.
*
* @api public
*/
$.fn.once = function (id, fn) {
if (typeof id != 'string') {
if (typeof id !== 'string') {
// Generate a numeric ID if the id passed can't be used as a CSS class.
if (!(id in cache)) {
cache[id] = ++uuid;
......@@ -69,6 +80,8 @@
* logic as $.each(). Returning true will continue to the next matched
* element in the set, while returning false will entirely break the
* iteration.
*
* @api public
*/
$.fn.removeOnce = function (id, fn) {
var name = id + '-processed';
......@@ -76,4 +89,4 @@
return $.isFunction(fn) ? elements.each(fn) : elements;
};
})(jQuery);
}));
......@@ -1249,8 +1249,8 @@ function system_library_info() {
// jQuery Once.
$libraries['jquery.once'] = array(
'title' => 'jQuery Once',
'website' => 'http://plugins.jquery.com/project/once',
'version' => '1.2',
'website' => 'http://plugins.jquery.com/once/',
'version' => '1.2.3',
'js' => array(
'core/assets/vendor/jquery-once/jquery.once.js' => array('group' => JS_LIBRARY, 'weight' => -19),
),
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment