Core: Patch over broken .removeData() in jQuery 1.6.1 + 1.6.2.

This commit is contained in:
Scott González 2012-11-05 15:38:31 -05:00
parent 8a32c39136
commit 886d6fe9fb

13
ui/jquery.ui.core.js vendored
View File

@ -230,6 +230,19 @@ if ( !$( "<a>" ).outerWidth( 1 ).jquery ) {
});
}
// support: jQuery 1.6.1, 1.6.2 (http://bugs.jquery.com/ticket/9413)
if ( $( "<a>" ).data( "a-b", "a" ).removeData( "a-b" ).data( "a-b" ) ) {
$.fn.removeData = (function( removeData ) {
return function( key ) {
if ( arguments.length ) {
return removeData.call( this, $.camelCase( key ) );
} else {
return removeData.call( this );
}
};
})( $.fn.removeData );
}