Permalink
Browse files

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

  • Loading branch information...
1 parent 8a32c39 commit 886d6fe9fb8bcbf5e4e968bdd535a0fbcf2b88f7 @scottgonzalez scottgonzalez committed Nov 5, 2012
Showing with 13 additions and 0 deletions.
  1. +13 −0 ui/jquery.ui.core.js
View
@@ -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 );
+}
+

0 comments on commit 886d6fe

Please sign in to comment.