Emanuele Marchi пре 10 година
родитељ
комит
c25abe60a4

Разлика између датотеке није приказан због своје велике величине
+ 0 - 0
dist/css/bootstrap2/bootstrap-switch.min.css


+ 38 - 38
dist/js/bootstrap-switch.js

@@ -20,7 +20,7 @@
  */
 
 (function() {
-  var __slice = [].slice;
+  var slice = [].slice;
 
   (function($, window) {
     "use strict";
@@ -55,43 +55,43 @@
             return function() {
               var classes;
               classes = ["" + _this.options.baseClass].concat(_this._getClasses(_this.options.wrapperClass));
-              classes.push(_this.options.state ? "" + _this.options.baseClass + "-on" : "" + _this.options.baseClass + "-off");
+              classes.push(_this.options.state ? _this.options.baseClass + "-on" : _this.options.baseClass + "-off");
               if (_this.options.size != null) {
-                classes.push("" + _this.options.baseClass + "-" + _this.options.size);
+                classes.push(_this.options.baseClass + "-" + _this.options.size);
               }
               if (_this.options.disabled) {
-                classes.push("" + _this.options.baseClass + "-disabled");
+                classes.push(_this.options.baseClass + "-disabled");
               }
               if (_this.options.readonly) {
-                classes.push("" + _this.options.baseClass + "-readonly");
+                classes.push(_this.options.baseClass + "-readonly");
               }
               if (_this.options.indeterminate) {
-                classes.push("" + _this.options.baseClass + "-indeterminate");
+                classes.push(_this.options.baseClass + "-indeterminate");
               }
               if (_this.options.inverse) {
-                classes.push("" + _this.options.baseClass + "-inverse");
+                classes.push(_this.options.baseClass + "-inverse");
               }
               if (_this.$element.attr("id")) {
-                classes.push("" + _this.options.baseClass + "-id-" + (_this.$element.attr("id")));
+                classes.push(_this.options.baseClass + "-id-" + (_this.$element.attr("id")));
               }
               return classes.join(" ");
             };
           })(this)()
         });
         this.$container = $("<div>", {
-          "class": "" + this.options.baseClass + "-container"
+          "class": this.options.baseClass + "-container"
         });
         this.$on = $("<span>", {
           html: this.options.onText,
-          "class": "" + this.options.baseClass + "-handle-on " + this.options.baseClass + "-" + this.options.onColor
+          "class": this.options.baseClass + "-handle-on " + this.options.baseClass + "-" + this.options.onColor
         });
         this.$off = $("<span>", {
           html: this.options.offText,
-          "class": "" + this.options.baseClass + "-handle-off " + this.options.baseClass + "-" + this.options.offColor
+          "class": this.options.baseClass + "-handle-off " + this.options.baseClass + "-" + this.options.offColor
         });
         this.$label = $("<span>", {
           html: this.options.labelText,
-          "class": "" + this.options.baseClass + "-label"
+          "class": this.options.baseClass + "-label"
         });
         this.$element.on("init.bootstrapSwitch", (function(_this) {
           return function() {
@@ -155,10 +155,10 @@
           return this.options.size;
         }
         if (this.options.size != null) {
-          this.$wrapper.removeClass("" + this.options.baseClass + "-" + this.options.size);
+          this.$wrapper.removeClass(this.options.baseClass + "-" + this.options.size);
         }
         if (value) {
-          this.$wrapper.addClass("" + this.options.baseClass + "-" + value);
+          this.$wrapper.addClass(this.options.baseClass + "-" + value);
         }
         this._width();
         this._containerPosition();
@@ -179,7 +179,7 @@
 
       BootstrapSwitch.prototype.toggleAnimate = function() {
         this.options.animate = !this.options.animate;
-        this.$wrapper.toggleClass("" + this.options.baseClass + "-animate");
+        this.$wrapper.toggleClass(this.options.baseClass + "-animate");
         return this.$element;
       };
 
@@ -197,7 +197,7 @@
       BootstrapSwitch.prototype.toggleDisabled = function() {
         this.options.disabled = !this.options.disabled;
         this.$element.prop("disabled", this.options.disabled);
-        this.$wrapper.toggleClass("" + this.options.baseClass + "-disabled");
+        this.$wrapper.toggleClass(this.options.baseClass + "-disabled");
         return this.$element;
       };
 
@@ -215,7 +215,7 @@
       BootstrapSwitch.prototype.toggleReadonly = function() {
         this.options.readonly = !this.options.readonly;
         this.$element.prop("readonly", this.options.readonly);
-        this.$wrapper.toggleClass("" + this.options.baseClass + "-readonly");
+        this.$wrapper.toggleClass(this.options.baseClass + "-readonly");
         return this.$element;
       };
 
@@ -233,7 +233,7 @@
       BootstrapSwitch.prototype.toggleIndeterminate = function() {
         this.options.indeterminate = !this.options.indeterminate;
         this.$element.prop("indeterminate", this.options.indeterminate);
-        this.$wrapper.toggleClass("" + this.options.baseClass + "-indeterminate");
+        this.$wrapper.toggleClass(this.options.baseClass + "-indeterminate");
         this._containerPosition();
         return this.$element;
       };
@@ -251,7 +251,7 @@
 
       BootstrapSwitch.prototype.toggleInverse = function() {
         var $off, $on;
-        this.$wrapper.toggleClass("" + this.options.baseClass + "-inverse");
+        this.$wrapper.toggleClass(this.options.baseClass + "-inverse");
         $on = this.$on.clone(true);
         $off = this.$off.clone(true);
         this.$on.replaceWith($off);
@@ -269,9 +269,9 @@
           return color;
         }
         if (color != null) {
-          this.$on.removeClass("" + this.options.baseClass + "-" + color);
+          this.$on.removeClass(this.options.baseClass + "-" + color);
         }
-        this.$on.addClass("" + this.options.baseClass + "-" + value);
+        this.$on.addClass(this.options.baseClass + "-" + value);
         this.options.onColor = value;
         return this.$element;
       };
@@ -283,9 +283,9 @@
           return color;
         }
         if (color != null) {
-          this.$off.removeClass("" + this.options.baseClass + "-" + color);
+          this.$off.removeClass(this.options.baseClass + "-" + color);
         }
-        this.$off.addClass("" + this.options.baseClass + "-" + value);
+        this.$off.addClass(this.options.baseClass + "-" + value);
         this.options.offColor = value;
         return this.$element;
       };
@@ -459,7 +459,7 @@
         }
         return setTimeout(function() {
           return callback();
-        }, 50);
+        }, 25);
       };
 
       BootstrapSwitch.prototype._init = function() {
@@ -469,7 +469,7 @@
             _this._width();
             return _this._containerPosition(null, function() {
               if (_this.options.animate) {
-                return _this.$wrapper.addClass("" + _this.options.baseClass + "-animate");
+                return _this.$wrapper.addClass(_this.options.baseClass + "-animate");
               }
             });
           };
@@ -484,7 +484,7 @@
               return window.clearInterval(initInterval);
             }
           };
-        })(this), 50);
+        })(this), 25);
       };
 
       BootstrapSwitch.prototype._elementHandlers = function() {
@@ -500,7 +500,7 @@
                 return;
               }
               _this.options.state = state;
-              _this.$wrapper.toggleClass("" + _this.options.baseClass + "-off").toggleClass("" + _this.options.baseClass + "-on");
+              _this.$wrapper.toggleClass(_this.options.baseClass + "-off").toggleClass(_this.options.baseClass + "-on");
               if (!skip) {
                 if (_this.$element.is(":radio")) {
                   $("[name='" + (_this.$element.attr('name')) + "']").not(_this.$element).prop("checked", false).trigger("change.bootstrapSwitch", true);
@@ -512,13 +512,13 @@
           "focus.bootstrapSwitch": (function(_this) {
             return function(e) {
               e.preventDefault();
-              return _this.$wrapper.addClass("" + _this.options.baseClass + "-focused");
+              return _this.$wrapper.addClass(_this.options.baseClass + "-focused");
             };
           })(this),
           "blur.bootstrapSwitch": (function(_this) {
             return function(e) {
               e.preventDefault();
-              return _this.$wrapper.removeClass("" + _this.options.baseClass + "-focused");
+              return _this.$wrapper.removeClass(_this.options.baseClass + "-focused");
             };
           })(this),
           "keydown.bootstrapSwitch": (function(_this) {
@@ -571,7 +571,7 @@
               e.stopPropagation();
               _this._dragStart = (e.pageX || e.originalEvent.touches[0].pageX) - parseInt(_this.$container.css("margin-left"), 10);
               if (_this.options.animate) {
-                _this.$wrapper.removeClass("" + _this.options.baseClass + "-animate");
+                _this.$wrapper.removeClass(_this.options.baseClass + "-animate");
               }
               return _this.$element.trigger("focus.bootstrapSwitch");
             };
@@ -588,7 +588,7 @@
                 return;
               }
               _this._dragEnd = difference;
-              return _this.$container.css("margin-left", "" + _this._dragEnd + "px");
+              return _this.$container.css("margin-left", _this._dragEnd + "px");
             };
           })(this),
           "mouseup.bootstrapSwitch touchend.bootstrapSwitch": (function(_this) {
@@ -599,7 +599,7 @@
               }
               e.preventDefault();
               if (_this.options.animate) {
-                _this.$wrapper.addClass("" + _this.options.baseClass + "-animate");
+                _this.$wrapper.addClass(_this.options.baseClass + "-animate");
               }
               if (_this._dragEnd) {
                 state = _this._dragEnd > -(_this._handleWidth / 2);
@@ -651,14 +651,14 @@
       };
 
       BootstrapSwitch.prototype._getClasses = function(classes) {
-        var c, cls, _i, _len;
+        var c, cls, i, len;
         if (!$.isArray(classes)) {
-          return ["" + this.options.baseClass + "-" + classes];
+          return [this.options.baseClass + "-" + classes];
         }
         cls = [];
-        for (_i = 0, _len = classes.length; _i < _len; _i++) {
-          c = classes[_i];
-          cls.push("" + this.options.baseClass + "-" + c);
+        for (i = 0, len = classes.length; i < len; i++) {
+          c = classes[i];
+          cls.push(this.options.baseClass + "-" + c);
         }
         return cls;
       };
@@ -668,7 +668,7 @@
     })();
     $.fn.bootstrapSwitch = function() {
       var args, option, ret;
-      option = arguments[0], args = 2 <= arguments.length ? __slice.call(arguments, 1) : [];
+      option = arguments[0], args = 2 <= arguments.length ? slice.call(arguments, 1) : [];
       ret = this;
       this.each(function() {
         var $this, data;

Разлика између датотеке није приказан због своје велике величине
+ 0 - 0
dist/js/bootstrap-switch.min.js


+ 8 - 22
gulpfile.coffee

@@ -1,5 +1,7 @@
 gulp = require 'gulp'
 $ = require('gulp-load-plugins') lazy: false
+server = require('browser-sync').create()
+reload = server.reload
 extend = require('util')._extend
 karma = require('karma').server
 karmaConfig = require './karma.json'
@@ -51,10 +53,6 @@ dest =
     fonts: "#{paths.docs}/fonts"
     markup: paths.base
 
-server =
-  host: 'localhost'
-  port: 3000
-
 banner = """
   /* ========================================================================
    * <%= pkg.name %> - v<%= pkg.version %>
@@ -181,20 +179,11 @@ gulp.task 'test-go', ['test-coffee'], (done) ->
   karma.start extend(karmaConfig, singleRun: true), done
 
 # extra
-gulp.task 'connect', ['docs'], ->
-  $.connect.server
-    root: [__dirname]
-    host: server.host
-    port: server.port
-    livereload: true
-
-gulp.task 'open', ['connect'], ->
-  gulp
-  .src 'index.html'
-  .pipe $.open '', url: "http://#{server.host}:#{server.port}"
+gulp.task 'serve', ['docs'], ->
+  server.init
+    server: true
+    port: 3000
 
-# watch
-gulp.task 'watch', ['connect'], ->
   gulp.watch src.scripts, ['coffee']
   gulp.watch src.stylesheets.bootstrap2, ['less-bootstrap2']
   gulp.watch src.stylesheets.bootstrap3, ['less-bootstrap3']
@@ -212,13 +201,10 @@ gulp.task 'watch', ['connect'], ->
     "#{dest.stylesheets.bootstrap3}/*.css"
     "*.html"
   ]
-  .on 'change', (event) ->
-    gulp.src event.path
-    .pipe $.connect.reload()
+  .on 'change', reload
 
 gulp.task 'docs', ['docs-vendor-scripts', 'docs-vendor-stylesheets', 'docs-vendor-fonts', 'docs-coffee', 'docs-less', 'docs-jade']
 gulp.task 'less', ['less-bootstrap2', 'less-bootstrap3']
 gulp.task 'dist', ['coffee', 'less']
 gulp.task 'test', ['coffee', 'test-coffee', 'test-go']
-gulp.task 'server', ['connect', 'open', 'watch']
-gulp.task 'default', ['dist', 'docs', 'server']
+gulp.task 'default', ['dist', 'docs', 'serve']

+ 0 - 2
gulpfile.js

@@ -1,2 +0,0 @@
-require('coffee-script/register');
-require('./gulpfile.coffee');

+ 13 - 12
package.json

@@ -37,25 +37,26 @@
   "license": "Apache Version 2",
   "readmeFilename": "README.md",
   "devDependencies": {
-    "coffee-script": "~1.8.0",
-    "gulp": "~3.8.10",
-    "gulp-changed": "^1.1.0",
-    "gulp-coffee": "~2.2.0",
+    "browser-sync": "^2.6.4",
+    "coffee-script": "~1.9.2",
+    "gulp": "^3.8.11",
+    "gulp-changed": "^1.2.1",
+    "gulp-coffee": "~2.3.1",
     "gulp-coffeelint": "~0.4.0",
     "gulp-connect": "^2.2.0",
     "gulp-header": "~1.2.2",
-    "gulp-jade": "^0.11.0",
-    "gulp-less": "^2.0.1",
-    "gulp-load-plugins": "^0.8.0",
+    "gulp-jade": "^1.0.0",
+    "gulp-less": "^3.0.2",
+    "gulp-load-plugins": "^0.10.0",
     "gulp-open": "~0.3.2",
-    "gulp-rename": "~1.2.0",
-    "gulp-uglify": "~1.1.0",
-    "gulp-util": "~3.0.2",
-    "jasmine-core": "^2.1.3",
+    "gulp-rename": "~1.2.2",
+    "gulp-uglify": "~1.2.0",
+    "gulp-util": "~3.0.4",
+    "jasmine-core": "^2.2.0",
     "karma": "~0.12.31",
     "karma-firefox-launcher": "~0.1.4",
     "karma-jasmine": "^0.3.5",
-    "less-plugin-clean-css": "^1.4.0",
+    "less-plugin-clean-css": "^1.5.0",
     "run-sequence": "~1.0.2"
   },
   "scripts": {

+ 38 - 38
test/bootstrap-switch.js

@@ -20,7 +20,7 @@
  */
 
 (function() {
-  var __slice = [].slice;
+  var slice = [].slice;
 
   (function($, window) {
     "use strict";
@@ -55,43 +55,43 @@
             return function() {
               var classes;
               classes = ["" + _this.options.baseClass].concat(_this._getClasses(_this.options.wrapperClass));
-              classes.push(_this.options.state ? "" + _this.options.baseClass + "-on" : "" + _this.options.baseClass + "-off");
+              classes.push(_this.options.state ? _this.options.baseClass + "-on" : _this.options.baseClass + "-off");
               if (_this.options.size != null) {
-                classes.push("" + _this.options.baseClass + "-" + _this.options.size);
+                classes.push(_this.options.baseClass + "-" + _this.options.size);
               }
               if (_this.options.disabled) {
-                classes.push("" + _this.options.baseClass + "-disabled");
+                classes.push(_this.options.baseClass + "-disabled");
               }
               if (_this.options.readonly) {
-                classes.push("" + _this.options.baseClass + "-readonly");
+                classes.push(_this.options.baseClass + "-readonly");
               }
               if (_this.options.indeterminate) {
-                classes.push("" + _this.options.baseClass + "-indeterminate");
+                classes.push(_this.options.baseClass + "-indeterminate");
               }
               if (_this.options.inverse) {
-                classes.push("" + _this.options.baseClass + "-inverse");
+                classes.push(_this.options.baseClass + "-inverse");
               }
               if (_this.$element.attr("id")) {
-                classes.push("" + _this.options.baseClass + "-id-" + (_this.$element.attr("id")));
+                classes.push(_this.options.baseClass + "-id-" + (_this.$element.attr("id")));
               }
               return classes.join(" ");
             };
           })(this)()
         });
         this.$container = $("<div>", {
-          "class": "" + this.options.baseClass + "-container"
+          "class": this.options.baseClass + "-container"
         });
         this.$on = $("<span>", {
           html: this.options.onText,
-          "class": "" + this.options.baseClass + "-handle-on " + this.options.baseClass + "-" + this.options.onColor
+          "class": this.options.baseClass + "-handle-on " + this.options.baseClass + "-" + this.options.onColor
         });
         this.$off = $("<span>", {
           html: this.options.offText,
-          "class": "" + this.options.baseClass + "-handle-off " + this.options.baseClass + "-" + this.options.offColor
+          "class": this.options.baseClass + "-handle-off " + this.options.baseClass + "-" + this.options.offColor
         });
         this.$label = $("<span>", {
           html: this.options.labelText,
-          "class": "" + this.options.baseClass + "-label"
+          "class": this.options.baseClass + "-label"
         });
         this.$element.on("init.bootstrapSwitch", (function(_this) {
           return function() {
@@ -155,10 +155,10 @@
           return this.options.size;
         }
         if (this.options.size != null) {
-          this.$wrapper.removeClass("" + this.options.baseClass + "-" + this.options.size);
+          this.$wrapper.removeClass(this.options.baseClass + "-" + this.options.size);
         }
         if (value) {
-          this.$wrapper.addClass("" + this.options.baseClass + "-" + value);
+          this.$wrapper.addClass(this.options.baseClass + "-" + value);
         }
         this._width();
         this._containerPosition();
@@ -179,7 +179,7 @@
 
       BootstrapSwitch.prototype.toggleAnimate = function() {
         this.options.animate = !this.options.animate;
-        this.$wrapper.toggleClass("" + this.options.baseClass + "-animate");
+        this.$wrapper.toggleClass(this.options.baseClass + "-animate");
         return this.$element;
       };
 
@@ -197,7 +197,7 @@
       BootstrapSwitch.prototype.toggleDisabled = function() {
         this.options.disabled = !this.options.disabled;
         this.$element.prop("disabled", this.options.disabled);
-        this.$wrapper.toggleClass("" + this.options.baseClass + "-disabled");
+        this.$wrapper.toggleClass(this.options.baseClass + "-disabled");
         return this.$element;
       };
 
@@ -215,7 +215,7 @@
       BootstrapSwitch.prototype.toggleReadonly = function() {
         this.options.readonly = !this.options.readonly;
         this.$element.prop("readonly", this.options.readonly);
-        this.$wrapper.toggleClass("" + this.options.baseClass + "-readonly");
+        this.$wrapper.toggleClass(this.options.baseClass + "-readonly");
         return this.$element;
       };
 
@@ -233,7 +233,7 @@
       BootstrapSwitch.prototype.toggleIndeterminate = function() {
         this.options.indeterminate = !this.options.indeterminate;
         this.$element.prop("indeterminate", this.options.indeterminate);
-        this.$wrapper.toggleClass("" + this.options.baseClass + "-indeterminate");
+        this.$wrapper.toggleClass(this.options.baseClass + "-indeterminate");
         this._containerPosition();
         return this.$element;
       };
@@ -251,7 +251,7 @@
 
       BootstrapSwitch.prototype.toggleInverse = function() {
         var $off, $on;
-        this.$wrapper.toggleClass("" + this.options.baseClass + "-inverse");
+        this.$wrapper.toggleClass(this.options.baseClass + "-inverse");
         $on = this.$on.clone(true);
         $off = this.$off.clone(true);
         this.$on.replaceWith($off);
@@ -269,9 +269,9 @@
           return color;
         }
         if (color != null) {
-          this.$on.removeClass("" + this.options.baseClass + "-" + color);
+          this.$on.removeClass(this.options.baseClass + "-" + color);
         }
-        this.$on.addClass("" + this.options.baseClass + "-" + value);
+        this.$on.addClass(this.options.baseClass + "-" + value);
         this.options.onColor = value;
         return this.$element;
       };
@@ -283,9 +283,9 @@
           return color;
         }
         if (color != null) {
-          this.$off.removeClass("" + this.options.baseClass + "-" + color);
+          this.$off.removeClass(this.options.baseClass + "-" + color);
         }
-        this.$off.addClass("" + this.options.baseClass + "-" + value);
+        this.$off.addClass(this.options.baseClass + "-" + value);
         this.options.offColor = value;
         return this.$element;
       };
@@ -459,7 +459,7 @@
         }
         return setTimeout(function() {
           return callback();
-        }, 50);
+        }, 25);
       };
 
       BootstrapSwitch.prototype._init = function() {
@@ -469,7 +469,7 @@
             _this._width();
             return _this._containerPosition(null, function() {
               if (_this.options.animate) {
-                return _this.$wrapper.addClass("" + _this.options.baseClass + "-animate");
+                return _this.$wrapper.addClass(_this.options.baseClass + "-animate");
               }
             });
           };
@@ -484,7 +484,7 @@
               return window.clearInterval(initInterval);
             }
           };
-        })(this), 50);
+        })(this), 25);
       };
 
       BootstrapSwitch.prototype._elementHandlers = function() {
@@ -500,7 +500,7 @@
                 return;
               }
               _this.options.state = state;
-              _this.$wrapper.toggleClass("" + _this.options.baseClass + "-off").toggleClass("" + _this.options.baseClass + "-on");
+              _this.$wrapper.toggleClass(_this.options.baseClass + "-off").toggleClass(_this.options.baseClass + "-on");
               if (!skip) {
                 if (_this.$element.is(":radio")) {
                   $("[name='" + (_this.$element.attr('name')) + "']").not(_this.$element).prop("checked", false).trigger("change.bootstrapSwitch", true);
@@ -512,13 +512,13 @@
           "focus.bootstrapSwitch": (function(_this) {
             return function(e) {
               e.preventDefault();
-              return _this.$wrapper.addClass("" + _this.options.baseClass + "-focused");
+              return _this.$wrapper.addClass(_this.options.baseClass + "-focused");
             };
           })(this),
           "blur.bootstrapSwitch": (function(_this) {
             return function(e) {
               e.preventDefault();
-              return _this.$wrapper.removeClass("" + _this.options.baseClass + "-focused");
+              return _this.$wrapper.removeClass(_this.options.baseClass + "-focused");
             };
           })(this),
           "keydown.bootstrapSwitch": (function(_this) {
@@ -571,7 +571,7 @@
               e.stopPropagation();
               _this._dragStart = (e.pageX || e.originalEvent.touches[0].pageX) - parseInt(_this.$container.css("margin-left"), 10);
               if (_this.options.animate) {
-                _this.$wrapper.removeClass("" + _this.options.baseClass + "-animate");
+                _this.$wrapper.removeClass(_this.options.baseClass + "-animate");
               }
               return _this.$element.trigger("focus.bootstrapSwitch");
             };
@@ -588,7 +588,7 @@
                 return;
               }
               _this._dragEnd = difference;
-              return _this.$container.css("margin-left", "" + _this._dragEnd + "px");
+              return _this.$container.css("margin-left", _this._dragEnd + "px");
             };
           })(this),
           "mouseup.bootstrapSwitch touchend.bootstrapSwitch": (function(_this) {
@@ -599,7 +599,7 @@
               }
               e.preventDefault();
               if (_this.options.animate) {
-                _this.$wrapper.addClass("" + _this.options.baseClass + "-animate");
+                _this.$wrapper.addClass(_this.options.baseClass + "-animate");
               }
               if (_this._dragEnd) {
                 state = _this._dragEnd > -(_this._handleWidth / 2);
@@ -651,14 +651,14 @@
       };
 
       BootstrapSwitch.prototype._getClasses = function(classes) {
-        var c, cls, _i, _len;
+        var c, cls, i, len;
         if (!$.isArray(classes)) {
-          return ["" + this.options.baseClass + "-" + classes];
+          return [this.options.baseClass + "-" + classes];
         }
         cls = [];
-        for (_i = 0, _len = classes.length; _i < _len; _i++) {
-          c = classes[_i];
-          cls.push("" + this.options.baseClass + "-" + c);
+        for (i = 0, len = classes.length; i < len; i++) {
+          c = classes[i];
+          cls.push(this.options.baseClass + "-" + c);
         }
         return cls;
       };
@@ -668,7 +668,7 @@
     })();
     $.fn.bootstrapSwitch = function() {
       var args, option, ret;
-      option = arguments[0], args = 2 <= arguments.length ? __slice.call(arguments, 1) : [];
+      option = arguments[0], args = 2 <= arguments.length ? slice.call(arguments, 1) : [];
       ret = this;
       this.each(function() {
         var $this, data;

Неке датотеке нису приказане због велике количине промена