Created
October 21, 2014 13:19
-
-
Save n0r8-ecomarkup/bb5fc1def3ad592ab1c2 to your computer and use it in GitHub Desktop.
Fancybox custom shwo and hide effect
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
$.fancybox.transitions.myZoomIn = function () { | |
$.fancybox.wrap.addClass('animate'); | |
setTimeout(function () { | |
$.fancybox._afterZoomIn(); | |
}, $.fancybox.current.openSpeed); | |
//or transition end event | |
}; | |
$.fancybox.transitions.myZoomOut = function () { | |
$.fancybox.wrap.addClass('animateOut'); | |
setTimeout(function () { | |
$.fancybox.wrap.hide(); | |
$.fancybox._afterZoomOut(); | |
}, $.fancybox.current.openSpeed); | |
//or transition end event | |
}; | |
$('.btn-popup').fancybox({ | |
padding: 0, | |
openMethod:'myZoomIn', | |
closeMethod:'myZoomOut', | |
openSpeed: 1000, | |
closeClick:true, | |
wrapCSS: 'fancybox-animation-parameters' | |
}); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment