Created
February 1, 2022 10:51
-
-
Save rmcgrew/857bd7f87d6508a4e04f09c933fca6b1 to your computer and use it in GitHub Desktop.
This file contains 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
$(".article__body img").magnificPopup({ | |
type: "image", | |
callbacks: { | |
elementParse: function(item) { | |
item.src = item.el.context.src; | |
} | |
}, | |
closeOnContentClick: true, | |
closeBtnInside: false, | |
fixedContentPos: true, | |
mainClass: "mfp-with-zoom", // class to remove default margin from left and right side | |
image: { | |
verticalFit: true | |
}, | |
zoom: { | |
enabled: true, | |
duration: 300 // don't foget to change the duration also in CSS | |
} | |
}); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment