Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- /* -- code for image gallery pop-up -- */
- $(document).ready(function() {
- $('#shopify-section-press img').each(function() {
- var currentImage = $(this);
- currentImage.wrap("<a class='image-link' title='" + currentImage.attr("title") + "' href='" + currentImage.attr("src") + "'</a>");
- });
- $('.image-link').magnificPopup({
- type: 'image',
- titleSrc: function(item) {
- return item.el.attr('title');
- },
- gallery: {
- enabled: true,
- preload: [0,2],
- navigateByImgClick: true,
- arrowMarkup: '<button title="%title%" type="button" class="mfp-arrow mfp-arrow-%dir%"></button>',
- tPrev: 'Previous (Left arrow key)',
- tNext: 'Next (Right arrow key)',
- tCounter: '<span class="mfp-counter">%curr% of %total%</span>'
- },
- mainClass: 'mfp-with-zoom',
- zoom: {
- enabled: true,
- duration: 300,
- easing: 'ease-in-out',
- opener: function(openerElement) {
- return openerElement.is('img') ? openerElement : openerElement.find('img');
- }
- }
- });
- });
- /* - end - */
Add Comment
Please, Sign In to add comment