Reply To: Image popup in single product page

#22994
guacha
Participant

Thanks!

This is the code I used and worked well, in the case someone else needs it:

<div class="my-magnific-popup">
    <a href="http://domain.com/big-image.jpg">
        <img src="http://domain.com/thumbnail.jpg" alt="Size Chart" width="300" height="171" class="alignnone size-medium">
    </a>
</div>

<script type='text/javascript'>(function ($) {
		$(document).ready(function () {
			$('.my-magnific-popup a').magnificPopup({
				mainClass: 'grosso-product-popup-content mfp-fade',
				type: 'image',
				midClick: true
			});
		});
	})(window.jQuery);
</script>

Magnific Popup documentation: https://dimsemenov.com/plugins/magnific-popup/documentation.html