summaryrefslogtreecommitdiffstats
path: root/jquery.once.js
diff options
context:
space:
mode:
authorRob Loach <robloach@gmail.com>2014-10-08 20:51:04 -0400
committerRob Loach <robloach@gmail.com>2014-10-08 20:51:04 -0400
commit1317ef15e336fcf0fa5885529f5696292cd8fa29 (patch)
treeb2b1ee1eddef334a529d21ac4d62e98e6cf2cfc0 /jquery.once.js
parent2f92d9eace2ca4fb9d49b8e91e3ec56cd1d7c259 (diff)
downloadjquery-once-1317ef15e336fcf0fa5885529f5696292cd8fa29.zip
jquery-once-1317ef15e336fcf0fa5885529f5696292cd8fa29.tar.gz
jquery-once-1317ef15e336fcf0fa5885529f5696292cd8fa29.tar.bz2
Switch from JSHint to ESLint
Diffstat (limited to 'jquery.once.js')
-rw-r--r--jquery.once.js14
1 files changed, 7 insertions, 7 deletions
diff --git a/jquery.once.js b/jquery.once.js
index d331e44..0b2bbb0 100644
--- a/jquery.once.js
+++ b/jquery.once.js
@@ -18,12 +18,12 @@
*/
(function (factory) {
"use strict";
- if (typeof exports === 'object') {
+ if (typeof exports === "object") {
// CommonJS
- factory(require('jquery'));
- } else if (typeof define === 'function' && define.amd) {
+ factory(require("jquery"));
+ } else if (typeof define === "function" && define.amd) {
// AMD
- define(['jquery'], factory);
+ define(["jquery"], factory);
} else {
// Global object
factory(jQuery);
@@ -60,7 +60,7 @@
$.fn.once = function (id) {
// Build the name for the data identifier. Generate a new unique id if the
// id parameter is not provided.
- var name = 'jquery-once-' + (id || ++uuid);
+ var name = "jquery-once-" + (id || ++uuid);
// Filter the elements by which do not have the data yet.
return this.filter(function() {
@@ -94,7 +94,7 @@
*/
$.fn.removeOnce = function (id) {
// Filter through the elements to find the once'd elements.
- return this.findOnce(id).removeData('jquery-once-' + id);
+ return this.findOnce(id).removeData("jquery-once-" + id);
};
/**
@@ -122,7 +122,7 @@
*/
$.fn.findOnce = function (id) {
// Filter the elements by which do have the data.
- var name = 'jquery-once-' + id;
+ var name = "jquery-once-" + id;
return this.filter(function() {
return $(this).data(name) === true;