Change the way jQuery.data works so that there is no longer a chance of collision between user data and internal data. Fixes #6968.
This commit is contained in:
parent
1d1d4fe112
commit
8e59a99e0a
10 changed files with 352 additions and 203 deletions
|
@ -133,11 +133,11 @@ jQuery.fn.extend({
|
|||
} else if ( type === "undefined" || type === "boolean" ) {
|
||||
if ( this.className ) {
|
||||
// store className if set
|
||||
jQuery.data( this, "__className__", this.className );
|
||||
jQuery._data( this, "__className__", this.className );
|
||||
}
|
||||
|
||||
// toggle whole className
|
||||
this.className = this.className || value === false ? "" : jQuery.data( this, "__className__" ) || "";
|
||||
this.className = this.className || value === false ? "" : jQuery._data( this, "__className__" ) || "";
|
||||
}
|
||||
});
|
||||
},
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue