diff options
author | Scott González <scott.gonzalez@gmail.com> | 2009-11-10 16:16:52 +0000 |
---|---|---|
committer | Scott González <scott.gonzalez@gmail.com> | 2009-11-10 16:16:52 +0000 |
commit | cbbac604ff93345aef7eeabbe864fddfca802c12 (patch) | |
tree | f108b83495735917e4d827b94fec0aeb127a73de | |
parent | 16c5c3a9cbbc0f3212e401f1f38b700764b99e12 (diff) | |
download | jquery-ui-cbbac604ff93345aef7eeabbe864fddfca802c12.tar.gz jquery-ui-cbbac604ff93345aef7eeabbe864fddfca802c12.zip |
Effects: Added support for effects on elements with right and/or bottom style settings.
Fixes #4540 - Fix bug effect for IE7. In create wrapper function.
-rw-r--r-- | ui/jquery.effects.core.js | 16 |
1 files changed, 12 insertions, 4 deletions
diff --git a/ui/jquery.effects.core.js b/ui/jquery.effects.core.js index 96eb44a4c..90ae82abb 100644 --- a/ui/jquery.effects.core.js +++ b/ui/jquery.effects.core.js @@ -343,11 +343,19 @@ $.extend($.effects, { //Transfer the positioning of the element to the wrapper if (element.css('position') == 'static') { wrapper.css({ position: 'relative' }); - element.css({ position: 'relative'} ); + element.css({ position: 'relative' }); } else { - var top = element.css('top'); if(isNaN(parseInt(top,10))) top = 'auto'; - var left = element.css('left'); if(isNaN(parseInt(left,10))) left = 'auto'; - wrapper.css({ position: element.css('position'), top: top, left: left, zIndex: element.css('z-index') }).show(); + var cssProps = { + position: element.css('position'), + zIndex: element.css('z-index') + }; + $.each(['top', 'left', 'bottom', 'right'], function(i, pos) { + cssProps[pos] = element.css(pos); + if (isNaN(parseInt(cssProps[pos], 10))) { + cssProps[pos] = 'auto'; + } + }); + wrapper.css(cssProps).show(); element.css({position: 'relative', top: 0, left: 0 }); } |