From a7325ccec27a00462d5f71aff163dcd7dc23e498 Mon Sep 17 00:00:00 2001 From: Rene Merino Date: Thu, 30 Jul 2015 18:15:09 -0400 Subject: [PATCH] Added new open animation from bottom up 'dropInBottom' --- jquery.fancyboxbox.transitions.js | 16 ++++++++++++++++ 1 file changed, 16 insertions(+) diff --git a/jquery.fancyboxbox.transitions.js b/jquery.fancyboxbox.transitions.js index 0936c46..da98d1d 100644 --- a/jquery.fancyboxbox.transitions.js +++ b/jquery.fancyboxbox.transitions.js @@ -41,6 +41,22 @@ complete: F._afterZoomOut }); }; + + F.transitions.dropInBottom = function() { + var endPos = F._getPosition(true); + var bottomPos = $(window).height(); + var animHeight = bottomPos - parseInt(endPos.top, 10); + + endPos.top = bottomPos + 'px'; + + F.wrap.css(endPos).show().animate({ + top: '-=' + animHeight + 'px' + }, { + duration: F.current.openSpeed, + complete: F._afterZoomIn + }); + }; + // Next gallery item - fly from left side to the center F.transitions.slideIn = function() { var endPos = F._getPosition(true);