1jQuery(window).on('elementor/frontend/init', function () { 2 elementorFrontend.hooks.addAction('frontend/element_ready/rkit-home-slider.default', function ($scope, $) { 3 4 const slider = $scope.find('.rkit-homeslider-slider'); 5 var config = slider.data('config'); 6 7 var conf = { 8 rtl: config.rtl, 9 arrows: config.arrows, 10 dots: config.dots, 11 autoplay: (config.autoplay) ? { 12 delay: 3000, 13 disableOnInteraction: false, 14 pauseOnMouseEnter: config.pauseOnHover 15 } : false, 16 loop: config.loop, 17 speed: config.speed, 18 slidesPerView: config.slidesPerView, 19 slidesPerGroup: config.slidesPerGroup, 20 breakpoints: config.breakpoints, 21 grabCursor: true, 22 initialSlide: (config.initial_slide == null) ? 0 : config.initial_slide, 23 } 24 25 if (config.slideStyle === 'fade') { 26 conf.effect = 'fade'; 27 conf.cardsEffect = { 28 crossFade: true, 29 }; 30 } 31 32 var pagination = { 33 pagination: { 34 enabled: config.dots, 35 el: '.rkit-homeslider-pagination', 36 type: 'bullets', 37 clickable: true, 38 bulletClass: 'rkit-homeslider-bullet', 39 bulletActiveClass: 'rkit-homeslider-bullet-active', 40 clickableClass: 'rkit-homeslider-bullet-clickable' 41 // dynamicBullets : true 42 } 43 } 44 45 var navigation = { 46 navigation: { 47 enabled: config.arrows, 48 nextEl: '.rkit-swiper-hs-button-next', 49 prevEl: '.rkit-swiper-hs-button-prev', 50 } 51 } 52 53 var dataConfig = { ...conf, ...pagination, ...navigation } 54 55 let container = $scope.find('.rkit-swiper-hs'); 56 const swiper = new Swiper(container[0], dataConfig); 57 58 // ð¥ Helper function untuk animasi split text 59 function splitTextToSpans(el, delayStep = 0.2) { 60 if (!el) return; 61 // Kalau sudah ada span, jangan di-split ulang 62 if (el.querySelector('span')) return; 63 64 const rawText = el.textContent.trim(); 65 el.textContent = ''; 66 67 const words = rawText.split(/\s+/).filter(Boolean); 68 69 words.forEach((word, index) => { 70 const span = document.createElement('span'); 71 span.textContent = word; 72 span.style.animationDelay = `${(delayStep * (index + 1)).toFixed(2)}s`; 73 el.appendChild(span); 74 el.appendChild(document.createTextNode(' ')); 75 }); 76 } 77 78 swiper.on('slideChangeTransitionStart', function () { 79 $('.image-cover-hsl').removeClass('animate-zoom-out'); 80 $('.swiper-slide-active .image-cover-hsl').addClass('animate-zoom-out'); 81 82 // Subtitle 83 const subTitle = document.querySelector('.swiper-slide-active .hs-subtitle-section .hs-sub-title'); 84 splitTextToSpans(subTitle); 85 86 // Title 87 const title = document.querySelector('.swiper-slide-active .hs-animation-1-title'); 88 splitTextToSpans(title); 89 90 // Desc 91 const desc = document.querySelector('.swiper-slide-active .hs-animation-1-desc'); 92 splitTextToSpans(desc); 93 94 // Typewriter subtitle 95 const typeSub = document.querySelector('.swiper-slide-active .hs-animation-2-subtitle'); 96 if (typeSub) {
97 typeSub.style.animation = 'none'; 98 void typeSub.offsetWidth; 99 typeSub.style.animation = 'typewritersubtitle 4s steps(30) 1s forwards, blink 0.7s step-end infinite'; 100 } 101 102 // Typewriter title 103 const typeTitle = document.querySelector('.swiper-slide-active .hs-animation-2-title'); 104 if (typeTitle) { 105 typeTitle.style.animation = 'none'; 106 void typeTitle.offsetWidth; 107 typeTitle.style.animation = 'typewritertitle 4s steps(30) 1s forwards, blink 0.7s step-end infinite'; 108 } 109 110 // Typewriter desc 111 const typeDesc = document.querySelector('.swiper-slide-active .hs-animation-2-desc'); 112 if (typeDesc) { 113 typeDesc.style.animation = 'none'; 114 void typeDesc.offsetWidth; 115 typeDesc.style.animation = 'typewriterdesc 4s steps(30) 1s forwards, blink 0.7s step-end infinite'; 116 } 117 }); 118 119 }); 120});
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.