diff options
author | John Resig <jeresig@gmail.com> | 2010-11-09 11:09:07 -0500 |
---|---|---|
committer | John Resig <jeresig@gmail.com> | 2010-11-09 11:09:07 -0500 |
commit | fb48ae8e6cca25fd29ef2b1eb23e9efa7b0eef7c (patch) | |
tree | 150abf047642cb0f1e8af19f1c3d0237fe07f9ff /src/attributes.js | |
parent | b5b3c73db3e4e615e504cd0af08ff6842b104542 (diff) | |
download | jquery-fb48ae8e6cca25fd29ef2b1eb23e9efa7b0eef7c.tar.gz jquery-fb48ae8e6cca25fd29ef2b1eb23e9efa7b0eef7c.zip |
Make sure that when multiple variables are being declared that assignments are each done on their own line.
Diffstat (limited to 'src/attributes.js')
-rw-r--r-- | src/attributes.js | 11 |
1 files changed, 8 insertions, 3 deletions
diff --git a/src/attributes.js b/src/attributes.js index 4393a9fdb..be221afa3 100644 --- a/src/attributes.js +++ b/src/attributes.js @@ -55,7 +55,9 @@ jQuery.fn.extend({ elem.className = value; } else { - var className = " " + elem.className + " ", setClass = elem.className; + var className = " " + elem.className + " ", + setClass = elem.className; + for ( var c = 0, cl = classNames.length; c < cl; c++ ) { if ( className.indexOf( " " + classNames[c] + " " ) < 0 ) { setClass += " " + classNames[c]; @@ -103,7 +105,8 @@ jQuery.fn.extend({ }, toggleClass: function( value, stateVal ) { - var type = typeof value, isBool = typeof stateVal === "boolean"; + var type = typeof value, + isBool = typeof stateVal === "boolean"; if ( jQuery.isFunction( value ) ) { return this.each(function(i) { @@ -115,7 +118,9 @@ jQuery.fn.extend({ return this.each(function() { if ( type === "string" ) { // toggle individual class names - var className, i = 0, self = jQuery(this), + var className, + i = 0, + self = jQuery( this ), state = stateVal, classNames = value.split( rspaces ); |