diff options
author | Jörn Zaefferer <joern.zaefferer@gmail.com> | 2011-06-19 14:45:20 +0200 |
---|---|---|
committer | Jörn Zaefferer <joern.zaefferer@gmail.com> | 2011-06-19 14:45:20 +0200 |
commit | aa7f8195f8c288dbefcb92064b68cb28064ac64c (patch) | |
tree | 333cd184f8a830c1b588e3d3d0368c134648a3b6 /ui/jquery.effects.slide.js | |
parent | 391282a9aeb4e5bb6ba6655d7f1d5d125f93155a (diff) | |
parent | fb210ae1ec16cefb1e4d4dfaf7d55499cac53ab8 (diff) | |
download | jquery-ui-aa7f8195f8c288dbefcb92064b68cb28064ac64c.tar.gz jquery-ui-aa7f8195f8c288dbefcb92064b68cb28064ac64c.zip |
Merge branch 'master' into widget-delegation
Diffstat (limited to 'ui/jquery.effects.slide.js')
-rw-r--r-- | ui/jquery.effects.slide.js | 16 |
1 files changed, 9 insertions, 7 deletions
diff --git a/ui/jquery.effects.slide.js b/ui/jquery.effects.slide.js index 6b0296754..ccb13fa1b 100644 --- a/ui/jquery.effects.slide.js +++ b/ui/jquery.effects.slide.js @@ -18,24 +18,26 @@ $.effects.effect.slide = function( o ) { // Create element var el = $( this ), - props = ['position','top','bottom','left','right'], + props = [ "position", "top", "bottom", "left", "right", "width", "height" ], mode = $.effects.setMode( el, o.mode || 'show' ), direction = o.direction || 'left', ref = (direction == 'up' || direction == 'down') ? 'top' : 'left', motion = (direction == 'up' || direction == 'left') ? 'pos' : 'neg', distance, - animation = {}; + animation = {}, + size; // Adjust - $.effects.save( el, props ); + $.effects.save( el, props ); el.show(); + distance = o.distance || el[ ref == 'top' ? "outerHeight" : "outerWidth" ]({ + margin: true + }); + $.effects.createWrapper( el ).css({ overflow: 'hidden' - }); - - distance = o.distance || el[ ref == 'top' ? "outerHeight" : "outerWidth" ]({ - margin: true }); + if (mode == 'show') { el.css( ref, motion == 'pos' ? (isNaN(distance) ? "-" + distance : -distance) : distance ); } |