Skip to content
Permalink
Browse files

Effects: Added support for effects on elements with right and/or bott…

…om style settings.

Fixes #4540 - Fix bug effect for IE7. In create wrapper function.
  • Loading branch information...
scottgonzalez committed Nov 10, 2009
1 parent 16c5c3a commit cbbac604ff93345aef7eeabbe864fddfca802c12
Showing with 12 additions and 4 deletions.
  1. +12 −4 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 });
}

0 comments on commit cbbac60

Please sign in to comment.
You can’t perform that action at this time.