PluginProbe
Easy Elements for Elementor – Addons & Website Templates / 1.5.0
Easy Elements for Elementor – Addons & Website Templates v1.5.0
1.5.3 1.5.2 1.5.1 1.5.0 1.4.9 1.4.6 1.4.7 1.4.8 1.4.5 1.4.4 1.4.3 1.2.7 1.2.8 1.2.9 1.3.0 1.3.1 1.3.2 1.3.3 1.3.4 1.3.5 1.3.6 1.3.7 1.3.8 1.3.9 1.4.0 All 47 releases
easy-elements / widgets / gallery / js / simple-gallery.min.js

simple-gallery.min.js in Easy Elements for Elementor – Addons & Website Templates 1.5.0, at widgets/gallery/js/simple-gallery.min.js

1 lines 3.0 KB
No matching file
Up and down to move Enter to open Esc to close
Raw Download Zip
1 !function($){"use strict";const initEelGalleryPopup=function($scope){const $gallery=$scope.find(".eel-gallery-grid.eel-popup-enabled");if(!$gallery.length)return;let currentIndex=0;const $lightbox=$scope.find(".eel-lightbox-gallery"),$lightboxImg=$lightbox.find(".eel-lightbox-image"),$galleryLinks=$gallery.find(".eel-popup-link");function showNext(){currentIndex=(currentIndex+1)%$galleryLinks.length,$lightboxImg.attr("src",$galleryLinks.eq(currentIndex).attr("href"))}function showPrev(){currentIndex=(currentIndex-1+$galleryLinks.length)%$galleryLinks.length,$lightboxImg.attr("src",$galleryLinks.eq(currentIndex).attr("href"))}$galleryLinks.off("click").on("click",(function(e){e.preventDefault();!function(index){currentIndex=index;const imgSrc=$galleryLinks.eq(currentIndex).attr("href");$lightboxImg.attr("src",imgSrc),$lightbox.fadeIn(300).css("display","grid")}($(this).data("index"))})),$lightbox.find(".eel-next").off("click").on("click",showNext),$lightbox.find(".eel-prev").off("click").on("click",showPrev),$lightbox.find(".eel-close").off("click").on("click",(function(){$lightbox.fadeOut(200)})),$lightbox.off("click").on("click",(function(e){$(e.target).is(".eel-lightbox-gallery, .eel-close")&&$lightbox.fadeOut(200)})),$(document).off("keydown.eelLightbox").on("keydown.eelLightbox",(function(e){$lightbox.is(":visible")&&("ArrowRight"===e.key?showNext():"ArrowLeft"===e.key?showPrev():"Escape"===e.key&&$lightbox.fadeOut(200))}))};$(window).on("elementor/frontend/init",(function(){elementorFrontend.hooks.addAction("frontend/element_ready/eel-gallery.default",initEelGalleryPopup)}))}(jQuery),function($){"use strict";const initEelCarouselPopup=function($scope){const $galleryLinks=$scope.find(".eel-popup-link-carousel"),$lightbox=$scope.find(".eel-lightbox-carousel"),$lightboxImg=$lightbox.find(".eel-lightbox-image-carousel");let currentIndex=0;function updateLightboxImage(index){currentIndex=index;const imgSrc=$galleryLinks.eq(currentIndex).attr("href");$lightboxImg.attr("src",imgSrc)}$galleryLinks.length&&($galleryLinks.off("click").on("click",(function(e){e.preventDefault();updateLightboxImage(parseInt($(this).attr("data-index"))||0),$lightbox.fadeIn(300).css("display","grid")})),$lightbox.find(".eel-next").off("click").on("click",(function(e){e.stopPropagation(),updateLightboxImage((currentIndex+1)%$galleryLinks.length)})),$lightbox.find(".eel-prev").off("click").on("click",(function(e){e.stopPropagation(),updateLightboxImage((currentIndex-1+$galleryLinks.length)%$galleryLinks.length)})),$lightbox.find(".eel-close").off("click").on("click",(function(){$lightbox.fadeOut(200)})),$(document).off("keydown.eelCarousel").on("keydown.eelCarousel",(function(e){$lightbox.is(":visible")&&("ArrowRight"===e.key&&$lightbox.find(".eel-next").click(),"ArrowLeft"===e.key&&$lightbox.find(".eel-prev").click(),"Escape"===e.key&&$lightbox.fadeOut(200))})))};$(window).on("elementor/frontend/init",(function(){elementorFrontend.hooks.addAction("frontend/element_ready/eel-image-carousel.default",initEelCarouselPopup)}))}(jQuery);