PageSourceSearch

https://resolutionx.ai/wp-content/plugins/rometheme-for-elementor/widgets/assets/js/home_slider.js?ver=1.5.4

js resolutionx.ai collected 2026-10-05 14:52:30 UTC 6,339 bytes, 183 lines download raw bytes

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
8    var conf = {
9      rtl: config.rtl,
10      arrows: config.arrows,
11      dots: config.dots,
12      autoplay: config.autoplay,
13      loop: config.loop,
14      speed: config.speed,
15      slidesPerView: config.slidesPerView,
16      slidesPerGroup: config.slidesPerGroup,
17      breakpoints: config.breakpoints,
18      grabCursor : true,
19      initialSlide : (config.initial_slide == null) ? 0 : config.initial_slide, 
20      // effect: 'fade',  
21      // fadeEffect: {
22      //   crossFade: true  
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      }
42    }
43
44    var navigation = {
45      navigation: {
46        enabled: config.arrows,
47        nextEl: '.rkit-swiper-hs-button-next',
48        prevEl: '.rkit-swiper-hs-button-prev',
49      }
50    }
51
52    var dataConfig = { ...conf, ...pagination, ...navigation }
53
54    let container = $scope.find('.rkit-swiper-hs');
55      const swiper = new Swiper(container[0], dataConfig);
56
57    swiper.on('slideChangeTransitionStart', function () { 
58      $('.image-cover-hsl').removeClass('animate-zoom-out');
59       
60      $('.swiper-slide-active .image-cover-hsl').addClass('animate-zoom-out');
61
62      //text animation  
63        // Seleksi elemen judul di slide aktif
64
65        // subtitle
66      // Pilih elemen subtitle section
67      const activeSlideSubTitleSection = document.querySelector('.swiper-slide-active .hs-subtitle-section');
68
69      if (activeSlideSubTitleSection) {
70        const activeSlideSubTitle = activeSlideSubTitleSection.querySelector('.hs-sub-title');
71        const iconElement = activeSlideSubTitleSection.querySelector('.icon-subtitle-hs');
72      
73        if (activeSlideSubTitle) {
74          const textContent = activeSlideSubTitle.textContent.trim(); // Ambil teks tanpa spasi berlebih
75          activeSlideSubTitle.textContent = ''; // Kosongkan teks untuk diisi ulang dengan elemen <span>
76      
77          // Bagi teks menjadi kata-kata dan tambahkan animasi
78          const words = textContent.split(' ');
79          words.forEach((word, index) => {
80            const span = document.createElement('span');
81            span.textContent = word;
82            span.style.animationDelay = `${0.2 * (index + 1)}s`;
83            activeSlideSubTitle.appendChild(span);
84            activeSlideSubTitle.appendChild(document.createTextNode(' ')); // Tambahkan spasi antar kata
85          });
86      
87          // Pastikan ikon tetap di tempatnya, baik di depan atau di belakang
88        
89        }
90      }
91      
92      
93
94        // title
95        const activeSlideTitle = document.querySelector('.swiper-slide-active .hs-animation-1-title');
96        
97        if (activeSlideTitle) {
98          // Ambil teks di dalam elemen
99          const words = activeSlideTitle.textContent.split(' ');
100          // Kosongkan teks asli
101          activeSlideTitle.textContent = '';
102          // Tambahkan setiap kata ke dalam elemen span
103          words.forEach(word => {
104            const span = document.createElement('span');
105            span.textContent = word;
106            activeSlideTitle.appendChild(span);
107            activeSlideTitle.appendChild(document.createTextNode(' '));  
108          });
109      
110          // Setelah elemen span dibuat, tambahkan animation-delay
111          activeSlideTitle.querySelectorAll('span').forEach((span, index) => {
112            const delay = 0.2 * (index + 1); 
113            span.style.animationDelay = `${delay}s`;
114          });
115        }
116
117        // desc
118        const activeSlideDesc = document.querySelector('.swiper-slide-active .hs-animation-1-desc');
119        
120        if (activeSlideDesc) { 
121          const words = activeSlideDesc.textContent.split(' '); 
122          activeSlideDesc.textContent = ''; 
123          words.forEach(word => {
124            const span = document.createElement('span');
125            span.textContent = word;
126            activeSlideDesc.appendChild(span);
127            activeSlideDesc.appendChild(document.createTextNode(' '));  
128          }); 
129          activeSlideDesc.querySelectorAll('span').forEach((span, index) => {
130            const delay = 0.2 * (index + 1); 
131            span.style.animationDelay = `${delay}s`;
132          });
133        }
134
135
136
137
138
139
140
141
142
143
144
145
146        // typewriter 
147        const activeSlideTextSubtitle = document.querySelector('.swiper-slide-active .hs-animation-2-subtitle');
148
149        if (activeSlideTextSubtitle) { 
150          activeSlideTextSubtitle.style.animation = 'none';
151          void activeSlideTextSubtitle.offsetWidth; // Trigger reflow
152          activeSlideTextSubtitle.style.animation = 'typewritersubtitle 4s steps(30) 1s forwards, blink 0.7s step-end infinite';
153        }
154
155        const activeSlideTextTitle = document.querySelector('.swiper-slide-active .hs-animation-2-title');
156
157        if (activeSlideTextTitle) { 
158          activeSlideTextTitle.style.animation = 'none';
159          void activeSlideTextTitle.offsetWidth; // Trigger reflow
160          activeSlideTextTitle.style.animation = 'typewritertitle 4s steps(30) 1s forwards, blink 0.7s step-end infinite';
161        }
162
163        const activeSlideTextDesc = document.querySelector('.swiper-slide-active .hs-animation-2-desc');
164
165        if (activeSlideTextDesc) { 
166          activeSlideTextDesc.style.animation = 'none';
167          void activeSlideTextDesc.offsetWidth; // Trigger reflow
168          activeSlideTextDesc.style.animation = 'typewriterdesc 4s steps(30) 1s forwards, blink 0.7s step-end infinite';
169        }
170
171
172        
173      });
174      
175
176      
177  
178
179
180 
181
182  });
183});

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.