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:
Colin Snover 2011-01-09 15:52:33 -06:00
parent 1d1d4fe112
commit 8e59a99e0a
10 changed files with 352 additions and 203 deletions

View file

@ -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__" ) || "";
}
});
},