.remove("...") removed too much.
This commit is contained in:
parent
3d3237c1c0
commit
62303ad5ef
4
src/jquery/jquery.js
vendored
4
src/jquery/jquery.js
vendored
|
@ -1232,6 +1232,7 @@ jQuery.extend({
|
||||||
elem.className += ( elem.className ? " " : "" ) + cur;
|
elem.className += ( elem.className ? " " : "" ) + cur;
|
||||||
});
|
});
|
||||||
},
|
},
|
||||||
|
|
||||||
// internal only, use removeClass("class")
|
// internal only, use removeClass("class")
|
||||||
remove: function( elem, c ){
|
remove: function( elem, c ){
|
||||||
elem.className = c ?
|
elem.className = c ?
|
||||||
|
@ -1239,6 +1240,7 @@ jQuery.extend({
|
||||||
return !jQuery.className.has( c, cur );
|
return !jQuery.className.has( c, cur );
|
||||||
}).join(' ') : "";
|
}).join(' ') : "";
|
||||||
},
|
},
|
||||||
|
|
||||||
// internal only, use is(".class")
|
// internal only, use is(".class")
|
||||||
has: function( t, c ) {
|
has: function( t, c ) {
|
||||||
t = t.className || t;
|
t = t.className || t;
|
||||||
|
@ -2032,7 +2034,7 @@ jQuery.each( {
|
||||||
jQuery.className[ jQuery.className.has(this,c) ? "remove" : "add" ](this, c);
|
jQuery.className[ jQuery.className.has(this,c) ? "remove" : "add" ](this, c);
|
||||||
},
|
},
|
||||||
remove: function(a){
|
remove: function(a){
|
||||||
if ( !a || jQuery.filter( a, [this] ).r )
|
if ( !a || jQuery.filter( a, [this] ).r.length )
|
||||||
this.parentNode.removeChild( this );
|
this.parentNode.removeChild( this );
|
||||||
},
|
},
|
||||||
empty: function() {
|
empty: function() {
|
||||||
|
|
Loading…
Reference in a new issue