1(function ($) { 2 3 const wdtImageBoxWidgetHandler = function($scope) { 4 const instance = new wdtImageBoxWidgetHandlerInit($scope); 5 if($scope.find('.wdt-image-box-holder').data('settings')) { 6 const settings = $scope.find('.wdt-image-box-holder').data('settings'); 7 if(settings['enable_popup']) { 8 instance.init(); 9 } 10 } 11 }; 12 13 const wdtImageBoxWidgetHandlerInit = function($scope) { 14 15 const $self = this; 16 $self.init = function() { 17 18 const $image_box_content_repeater = $scope.find('.wdt-content-image-wrapper'); 19 $image_box_content_repeater.each(function() { 20 21 const $this_image_box = $(this); 22 const $image_url = $this_image_box.find('img').attr('src'); 23 $self.onClickInit($this_image_box, $image_url); 24 25 }); 26 27 }; 28 29 $self.onClickInit = function($this_image_box, $image_url) { 30 31 $this_image_box.magnificPopup({ 32 items: { 33 src: $image_url, 34 type: 'image', 35 }, 36 removalDelay: 500, 37 showCloseBtn: true, 38 enableEscapeKey: true, 39 closeOnBgClick: true, 40 mainClass: 'wdt-image-box-popup wdt-popup-box-window', 41 }); 42 43 }; 44 45 }; 46 47 $(window).on('elementor/frontend/init', function () { 48 elementorFrontend.hooks.addAction('frontend/element_ready/wdt-image-box.default', wdtImageBoxWidgetHandler); 49 }); 50 51})(jQuery);
Line numbers count LF bytes from the start of the resource, as the search results do. Vendor segments are library code the classifier recognised; they are stored but not indexed. Bytes are shown as Latin1 characters, one per byte.