Base theme for LMMI Journal
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 
 
 
 
 

32 lines
1.1 KiB

(function ($, Drupal, drupalSettings) {
Drupal.behaviors.mtMagnificPopupFieldImageSlider = {
attach: function (context, settings) {
$(context).find('.in-page-images-slider li:not(.clone) .image-popup').once('mtMagnificPopupFieldImageSliderInit').magnificPopup({
type:"image",
removalDelay: 300,
mainClass: "mfp-fade",
gallery: {
enabled: true, // set to true to enable gallery
},
image: {
titleSrc: function(item) {
return item.el.closest('.overlay-container').children()[1].title || '';
}
}
});
$(context).find('.one-value .image-popup').once('mtMagnificPopupFieldImageInit').magnificPopup({
type:"image",
removalDelay: 300,
mainClass: "mfp-fade",
gallery: {
enabled: true, // set to true to enable gallery
},
image: {
titleSrc: function(item) {
return item.el.closest('.overlay-container').children()[1].title || '';
}
}
});
}
};
})(jQuery, Drupal, drupalSettings);