]> 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>
Mon, 5 Nov 2012 20:38:31 +0000 (15:38 -0500)
ui/jquery.ui.core.js

index 5d8a9935c7406d884a849e3f50204e348381a7ac..2886343764ef4b29ae3d90c6b9a9d733fba7fc4e 100644 (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 );
+}
+