diff options
author | Chris Antaki <ChrisAntaki@gmail.com> | 2013-11-05 21:23:04 -0800 |
---|---|---|
committer | Richard Gibson <richard.gibson@gmail.com> | 2013-12-16 12:48:46 -0500 |
commit | b8d0d54a3c4960794a1b492957abeb56eddd1e48 (patch) | |
tree | e07b6c64faed7953e5d27c81058438738d771a93 /src/attributes | |
parent | b278d8174f307fd351ae9ce6409c1806e7426e34 (diff) | |
download | jquery-b8d0d54a3c4960794a1b492957abeb56eddd1e48.tar.gz jquery-b8d0d54a3c4960794a1b492957abeb56eddd1e48.zip |
Reduce size by reordering variable declarations
Close gh-1421
Diffstat (limited to 'src/attributes')
-rw-r--r-- | src/attributes/classes.js | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/src/attributes/classes.js b/src/attributes/classes.js index d7212f9de..7d714b8e1 100644 --- a/src/attributes/classes.js +++ b/src/attributes/classes.js @@ -11,9 +11,9 @@ var rclass = /[\t\r\n\f]/g; jQuery.fn.extend({ addClass: function( value ) { var classes, elem, cur, clazz, j, finalValue, + proceed = typeof value === "string" && value, i = 0, - len = this.length, - proceed = typeof value === "string" && value; + len = this.length; if ( jQuery.isFunction( value ) ) { return this.each(function( j ) { @@ -54,9 +54,9 @@ jQuery.fn.extend({ removeClass: function( value ) { var classes, elem, cur, clazz, j, finalValue, + proceed = arguments.length === 0 || typeof value === "string" && value, i = 0, - len = this.length, - proceed = arguments.length === 0 || typeof value === "string" && value; + len = this.length; if ( jQuery.isFunction( value ) ) { return this.each(function( j ) { |