jQuery(document).ready(function($){
$('.image-popup').magnificPopup({
type: 'image',
closeOnContentClick: true,
closeBtnInside: false,
fixedContentPos: true,
mainClass: 'mfp-no-margins mfp-with-zoom', // class to remove default margin from left and right side
image: {
verticalFit: true,
tError: 'The image #%curr% could not be loaded.',
titleSrc: function(item) {
return item.el.attr('data-caption') + '' + item.el.attr('data-desc') + '';
}
},
zoom: {
enabled: true,
duration: 300 // don't forget to change the duration also in CSS
}
});
$(document).ready(function() {
$('.popup-gallery').magnificPopup({
delegate: 'a',
type: 'image',
tLoading: 'Loading image #%curr%...',
mainClass: 'mfp-img-mobile',
gallery: {
enabled: true,
navigateByImgClick: true,
preload: [0,1] // Will preload 0 - before current, and 1 after the current image
},
image: {
tError: 'The image #%curr% could not be loaded.',
titleSrc: function(item) {
return item.el.attr('title') + 'by Marsel Van Oosten';
}
}
});
});
});