diff options
author | Scott González <scott.gonzalez@gmail.com> | 2012-11-05 15:38:31 -0500 |
---|---|---|
committer | Scott González <scott.gonzalez@gmail.com> | 2012-11-13 10:50:32 -0500 |
commit | 310dff10eab98f6649eac6a5aed05b43c7238393 (patch) | |
tree | a1cb4db3a535eb6d0579dec9578a894815c46309 | |
parent | 177d0f2746c6aceb4323a1e11b1a4d0aeb46a6b7 (diff) | |
download | jquery-ui-310dff10eab98f6649eac6a5aed05b43c7238393.tar.gz jquery-ui-310dff10eab98f6649eac6a5aed05b43c7238393.zip |
Core: Patch over broken .removeData() in jQuery 1.6.1 + 1.6.2.
(cherry picked from commit 886d6fe9fb8bcbf5e4e968bdd535a0fbcf2b88f7)
-rw-r--r-- | ui/jquery.ui.core.js | 13 |
1 files changed, 13 insertions, 0 deletions
diff --git a/ui/jquery.ui.core.js b/ui/jquery.ui.core.js index 5e86e50b0..d5c38d555 100644 --- a/ui/jquery.ui.core.js +++ b/ui/jquery.ui.core.js @@ -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 ); +} + |