diff options
| author | Juuso Lapinlampi <wub@partyvan.eu> | 2015-09-28 18:08:36 +0200 |
|---|---|---|
| committer | Juuso Lapinlampi <wub@partyvan.eu> | 2015-09-28 18:09:07 +0200 |
| commit | 408e3cf72b993655ae3b8f8eeb9f8a7b95d21c54 (patch) | |
| tree | 20356e62c9ce4030d469ab324de950b4948d36bd /js/cabinet.js | |
| parent | 5462c603b6b9389fd7ea8e55998045a4452d2d7d (diff) | |
Prefix cheesesteak.js jQuery object variables with a $
This fixes Airbnb ES5 style guide violations.
Diffstat (limited to 'js/cabinet.js')
| -rw-r--r-- | js/cabinet.js | 12 |
1 files changed, 6 insertions, 6 deletions
diff --git a/js/cabinet.js b/js/cabinet.js index 2f3a3a6..8414df2 100644 --- a/js/cabinet.js +++ b/js/cabinet.js @@ -27,15 +27,15 @@ }; $.fn.cabinet = function(input) { - input = $(input); + var $input = $(input); var _this = this; var passthrough = function(outer, inner, prevent, fn) { _this.on(outer, function(e) { if (inner === 'click') { - input[0].click(); + $input[0].click(); } else { - input.trigger(inner); + $input.trigger(inner); } if (prevent) { @@ -48,9 +48,9 @@ }, false); }; - input[0].filelist = Object.create(FileList); + $input[0].filelist = Object.create(FileList); - input.on('change', function(e) { + $input.on('change', function(e) { this.filelist = e.target.files; _this.change(); }); @@ -60,7 +60,7 @@ passthrough('dragleave', 'dragleave', true); passthrough('click', 'click', false); passthrough('drop', 'dragleave', true, function(e) { - input[0].filelist = e.dataTransfer.files; + $input[0].filelist = e.dataTransfer.files; _this.change(); }); }; |
