Created
April 21, 2015 17:05
-
-
Save besimhu/3d5a845a4746e5dea3e9 to your computer and use it in GitHub Desktop.
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
// Magnific lightbox settings | |
$('.ign-popup').magnificPopup({ | |
type: 'inline', | |
preloader: false, | |
removalDelay: 500, | |
callbacks: { | |
beforeOpen: function() { | |
this.st.mainClass = this.st.el.attr('data-effect'); | |
} | |
}, | |
midClick: true | |
}); | |
// And these are your css styles to add to the magnific css | |
.mfp-zoom-in { | |
/* start state */ | |
.mfp-with-anim { | |
opacity: 0; | |
transition: all 0.2s ease-in-out; | |
transform: scale(0.8); | |
} | |
&.mfp-bg { | |
opacity: 0; | |
transition: all 0.3s ease-out; | |
} | |
/* animate in */ | |
&.mfp-ready { | |
.mfp-with-anim { | |
opacity: 1; | |
transform: scale(1); | |
} | |
&.mfp-bg { | |
opacity: 0.8; | |
} | |
} | |
/* animate out */ | |
&.mfp-removing { | |
.mfp-with-anim { | |
transform: scale(0.8); | |
opacity: 0; | |
} | |
&.mfp-bg { | |
opacity: 0; | |
} | |
} | |
} | |
.mfp-zoom-out { | |
/* start state */ | |
.mfp-with-anim { | |
opacity: 0; | |
transition: all 0.3s ease-in-out; | |
transform: scale(1.3); | |
} | |
&.mfp-bg { | |
opacity: 0; | |
transition: all 0.3s ease-out; | |
} | |
/* animate in */ | |
&.mfp-ready { | |
.mfp-with-anim { | |
opacity: 1; | |
transform: scale(1); | |
} | |
&.mfp-bg { | |
opacity: 0.8; | |
} | |
} | |
/* animate out */ | |
&.mfp-removing { | |
.mfp-with-anim { | |
transform: scale(1.3); | |
opacity: 0; | |
} | |
&.mfp-bg { | |
opacity: 0; | |
} | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment