]> source.dussan.org Git - jquery-ui.git/commitdiff
Core: Patch over broken .removeData() in jQuery 1.6.1 + 1.6.2.
authorScott González <scott.gonzalez@gmail.com>
Mon, 5 Nov 2012 20:38:31 +0000 (15:38 -0500)
committerScott González <scott.gonzalez@gmail.com>
Tue, 13 Nov 2012 15:50:32 +0000 (10:50 -0500)
(cherry picked from commit 886d6fe9fb8bcbf5e4e968bdd535a0fbcf2b88f7)

ui/jquery.ui.core.js

index 5e86e50b021b783b083078da9abe272b1e3489c8..d5c38d5556c3017b658deacbfb71d74769cd95f2 100644 (file)
@@ -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 );
+}
+