@@ 7196-7223 (lines=28) @@ | ||
7193 | jQuery( this ).removeClass( value.call( this, j, this.className ) ); |
|
7194 | }); |
|
7195 | } |
|
7196 | if ( proceed ) { |
|
7197 | classes = ( value || "" ).match( rnotwhite ) || []; |
|
7198 | ||
7199 | for ( ; i < len; i++ ) { |
|
7200 | elem = this[ i ]; |
|
7201 | // This expression is here for better compressibility (see addClass) |
|
7202 | cur = elem.nodeType === 1 && ( elem.className ? |
|
7203 | ( " " + elem.className + " " ).replace( rclass, " " ) : |
|
7204 | "" |
|
7205 | ); |
|
7206 | ||
7207 | if ( cur ) { |
|
7208 | j = 0; |
|
7209 | while ( (clazz = classes[j++]) ) { |
|
7210 | // Remove *all* instances |
|
7211 | while ( cur.indexOf( " " + clazz + " " ) >= 0 ) { |
|
7212 | cur = cur.replace( " " + clazz + " ", " " ); |
|
7213 | } |
|
7214 | } |
|
7215 | ||
7216 | // only assign if different to avoid unneeded rendering. |
|
7217 | finalValue = value ? jQuery.trim( cur ) : ""; |
|
7218 | if ( elem.className !== finalValue ) { |
|
7219 | elem.className = finalValue; |
|
7220 | } |
|
7221 | } |
|
7222 | } |
|
7223 | } |
|
7224 | ||
7225 | return this; |
|
7226 | }, |
|
@@ 7154-7180 (lines=27) @@ | ||
7151 | }); |
|
7152 | } |
|
7153 | ||
7154 | if ( proceed ) { |
|
7155 | // The disjunction here is for better compressibility (see removeClass) |
|
7156 | classes = ( value || "" ).match( rnotwhite ) || []; |
|
7157 | ||
7158 | for ( ; i < len; i++ ) { |
|
7159 | elem = this[ i ]; |
|
7160 | cur = elem.nodeType === 1 && ( elem.className ? |
|
7161 | ( " " + elem.className + " " ).replace( rclass, " " ) : |
|
7162 | " " |
|
7163 | ); |
|
7164 | ||
7165 | if ( cur ) { |
|
7166 | j = 0; |
|
7167 | while ( (clazz = classes[j++]) ) { |
|
7168 | if ( cur.indexOf( " " + clazz + " " ) < 0 ) { |
|
7169 | cur += clazz + " "; |
|
7170 | } |
|
7171 | } |
|
7172 | ||
7173 | // only assign if different to avoid unneeded rendering. |
|
7174 | finalValue = jQuery.trim( cur ); |
|
7175 | if ( elem.className !== finalValue ) { |
|
7176 | elem.className = finalValue; |
|
7177 | } |
|
7178 | } |
|
7179 | } |
|
7180 | } |
|
7181 | ||
7182 | return this; |
|
7183 | }, |