@@ -57,7 +57,7 @@ jQuery.fn.extend({
57
57
setClass = " " + elem . className + " " ;
58
58
59
59
for ( c = 0 , cl = classNames . length ; c < cl ; c ++ ) {
60
- if ( ! ~ setClass . indexOf ( " " + classNames [ c ] + " " ) ) {
60
+ if ( setClass . indexOf ( " " + classNames [ c ] + " " ) < 0 ) {
61
61
setClass += classNames [ c ] + " " ;
62
62
}
63
63
}
@@ -90,7 +90,7 @@ jQuery.fn.extend({
90
90
// loop over each item in the removal list
91
91
for ( c = 0 , cl = removes . length ; c < cl ; c ++ ) {
92
92
// Remove until there is nothing to remove,
93
- while ( className . indexOf ( " " + removes [ c ] + " " ) > - 1 ) {
93
+ while ( className . indexOf ( " " + removes [ c ] + " " ) >= 0 ) {
94
94
className = className . replace ( " " + removes [ c ] + " " , " " ) ;
95
95
}
96
96
}
@@ -144,7 +144,7 @@ jQuery.fn.extend({
144
144
i = 0 ,
145
145
l = this . length ;
146
146
for ( ; i < l ; i ++ ) {
147
- if ( this [ i ] . nodeType === 1 && ( " " + this [ i ] . className + " " ) . replace ( rclass , " " ) . indexOf ( className ) > - 1 ) {
147
+ if ( this [ i ] . nodeType === 1 && ( " " + this [ i ] . className + " " ) . replace ( rclass , " " ) . indexOf ( className ) >= 0 ) {
148
148
return true ;
149
149
}
150
150
}
@@ -322,7 +322,7 @@ jQuery.extend({
322
322
return ret ;
323
323
324
324
} else {
325
- elem . setAttribute ( name , "" + value ) ;
325
+ elem . setAttribute ( name , value + "" ) ;
326
326
return value ;
327
327
}
328
328
@@ -586,7 +586,7 @@ if ( !jQuery.support.style ) {
586
586
return elem . style . cssText . toLowerCase ( ) || undefined ;
587
587
} ,
588
588
set : function ( elem , value ) {
589
- return ( elem . style . cssText = "" + value ) ;
589
+ return ( elem . style . cssText = value + "" ) ;
590
590
}
591
591
} ;
592
592
}
0 commit comments