fix for clip to better work with images (animates wrapper for images only)

This commit is contained in:
Aaron Eisenberger 2008-06-24 13:53:19 +00:00
parent ad2a61daaf
commit 26c84c7e9b

View File

@ -31,7 +31,7 @@ $.effects.clip = function(o) {
size: (direction == 'vertical') ? 'height' : 'width', size: (direction == 'vertical') ? 'height' : 'width',
position: (direction == 'vertical') ? 'top' : 'left' position: (direction == 'vertical') ? 'top' : 'left'
}; };
var distance = (direction == 'vertical') ? wrapper.height() : wrapper.width(); var distance = (direction == 'vertical') ? animate.height() : animate.width();
if(mode == 'show') { animate.css(ref.size, 0); animate.css(ref.position, distance / 2); } // Shift if(mode == 'show') { animate.css(ref.size, 0); animate.css(ref.position, distance / 2); } // Shift
// Animation // Animation