aboutsummaryrefslogtreecommitdiffstats
path: root/ui/jquery.ui.effect.js
diff options
context:
space:
mode:
Diffstat (limited to 'ui/jquery.ui.effect.js')
-rw-r--r--ui/jquery.ui.effect.js14
1 files changed, 12 insertions, 2 deletions
diff --git a/ui/jquery.ui.effect.js b/ui/jquery.ui.effect.js
index 93e85ebfd..7cabe5849 100644
--- a/ui/jquery.ui.effect.js
+++ b/ui/jquery.ui.effect.js
@@ -861,9 +861,19 @@ $.extend( $.effects, {
// Restores a set of previously saved properties from a data storage
restore: function( element, set ) {
- for( var i=0; i < set.length; i++ ) {
+ var val, i;
+ for( i=0; i < set.length; i++ ) {
if ( set[ i ] !== null ) {
- element.css( set[ i ], element.data( dataSpace + set[ i ] ) );
+ val = element.data( dataSpace + set[ i ] );
+ // support: jQuery 1.6.2
+ // http://bugs.jquery.com/ticket/9917
+ // jQuery 1.6.2 incorrectly returns undefined for any falsy value.
+ // We can't differentiate between "" and 0 here, so we just assume
+ // empty string since it's likely to be a more common value...
+ if ( val === undefined ) {
+ val = "";
+ }
+ element.css( set[ i ], val );
}
}
},