Navigation Menu

Skip to content

Commit

Permalink
Core: Patch over broken .removeData() in jQuery 1.6.1 + 1.6.2.
Browse files Browse the repository at this point in the history
(cherry picked from commit 886d6fe)
  • Loading branch information
scottgonzalez committed Nov 13, 2012
1 parent 177d0f2 commit 310dff1
Showing 1 changed file with 13 additions and 0 deletions.
13 changes: 13 additions & 0 deletions ui/jquery.ui.core.js
Expand Up @@ -252,6 +252,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 );
}




Expand Down

0 comments on commit 310dff1

Please sign in to comment.