preserve percent values if they are returned in createWrapper

This commit is contained in:
Aaron Eisenberger 2008-06-30 18:52:57 +00:00
parent 10747c3871
commit c400e02621

View File

@ -53,8 +53,8 @@ $.extend($.effects, {
wrapper.css({position: 'relative'}); wrapper.css({position: 'relative'});
el.css({position: 'relative'}); el.css({position: 'relative'});
} else { } else {
var top = parseInt(el.css('top'), 10); if(isNaN(top)) top = 'auto'; var top = el.css('top'); if(isNaN(parseInt(top))) top = 'auto';
var left = parseInt(el.css('left'), 10); if(isNaN(left)) left = 'auto'; var left = el.css('left'); if(isNaN(parseInt(left))) left = 'auto';
wrapper.css({ position: el.css('position'), top: top, left: left, zIndex: el.css('z-index') }).show(); wrapper.css({ position: el.css('position'), top: top, left: left, zIndex: el.css('z-index') }).show();
el.css({position: 'relative', top:0, left:0}); el.css({position: 'relative', top:0, left:0});
} }