1jQuery(function ($) { 2 if (!$('.elementor-widget-tabs_repeater_widget').length) { 3 return; 4 } 5 6 function replayEntranceAnimations($target) { 7 const deviceMode = 8 window.elementorFrontend && 9 typeof window.elementorFrontend.getCurrentDeviceMode === 'function' 10 ? window.elementorFrontend.getCurrentDeviceMode() 11 : 'desktop'; 12 13 $target.find('[data-settings]').each(function () { 14 const element = this; 15 let settings; 16 17 try { 18 settings = JSON.parse(element.getAttribute('data-settings') || '{}'); 19 } catch (error) { 20 return; 21 } 22 23 const responsiveAnimation = settings['animation_' + deviceMode]; 24 const animation = responsiveAnimation || settings.animation; 25 26 if (!animation || animation === 'none') { 27 return; 28 } 29 30 const animationClasses = Object.keys(settings) 31 .filter(function (key) { 32 return /^animation(?:_(?:widescreen|laptop|tablet_extra|tablet|mobile_extra|mobile))?$/.test(key); 33 }) 34 .map(function (key) { 35 return settings[key]; 36 }) 37 .filter(function (value) { 38 return value && value !== 'none'; 39 }); 40 41 window.cancelAnimationFrame($(element).data('tabsAnimationFrame')); 42 43 $(element) 44 .removeClass(['animated'].concat(animationClasses).join(' ')) 45 .addClass('elementor-invisible'); 46 47 // Force a reflow so the CSS animation restarts on every activation. 48 void element.offsetWidth; 49 50 // Elementor delays are intended for page entrance. On tab activation 51 // they leave visible gaps, so replay on the next paint instead. 52 const animationFrame = window.requestAnimationFrame(function () { 53 $(element) 54 .removeClass('elementor-invisible') 55 .addClass('animated ' + animation); 56 }); 57 58 $(element).data('tabsAnimationFrame', animationFrame); 59 }); 60 } 61 62 $('.elementor-widget-tabs_repeater_widget a').on('click', function (e) { 63 e.preventDefault(); 64 65 const targetID = $(this).attr('href'); 66 const $target = $(targetID); 67 68 if (!$target.length) { 69 return; 70 } 71 72 $('.tabcontent').removeClass('active'); 73 $target.addClass('active'); 74 75 replayEntranceAnimations($target); 76 77 $('html, body').stop(true, true).animate( 78 { 79 scrollTop: $target.offset().top - 180 80 }, 81 1 82 ); 83 }); 84});
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.