PageSourceSearch

https://kiddiecast.eu/wp-content/plugins/rometheme-for-elementor/I…/assets/js/animated_heading.js?ver=2.1.6

js kiddiecast.eu collected 2026-10-02 16:06:06 UTC 6,795 bytes, 199 lines download raw bytes

1jQuery(window).on("elementor/frontend/init", function () {
2  elementorFrontend.hooks.addAction(
3    "frontend/element_ready/rkit-animated-heading.default",
4    function ($scope, $) {
5      $scope.find(".rkit-animated-heading").each(function () {
6        var duration = $(this).data("duration");
7
8        $scope.find(".text-writing").each(function () {
9          const $el = $(this);
10          var toRotate = JSON.parse($el.attr("data-type"));
11          var period = $el.attr("data-period");
12
13          const maxWordLength = Math.max(
14            ...toRotate.map((word) => word.length)
15          );
16
17          let currentWordIndex = 0;
18          let currentWord = toRotate[currentWordIndex];
19          let index = 0;
20
21          function typeText() {
22            $el.find('.rkit-animated-heading__text').text(currentWord.slice(0, index++));
23
24            if (index <= currentWord.length) {
25              setTimeout(typeText, duration /10 );
26            } else {
27              setTimeout(eraseText, duration );
28            }
29          }
30
31          function eraseText() {
32            $el.find('.rkit-animated-heading__text').text(currentWord.slice(0, index));
33
34            if (index > 0) {
35              index--;
36              setTimeout(eraseText, duration /10 );
37            } else {
38              currentWordIndex = (currentWordIndex + 1) % toRotate.length;
39              currentWord = toRotate[currentWordIndex];
40              setTimeout(typeText, maxWordLength * 50);
41            }
42          }
43
44          typeText();
45        });
46
47        $scope.find(".text-flipping").each(function () {
48          var textElement = $(this);
49          var data = JSON.parse(textElement.attr("data-type"));
50          textElement.find('.rkit-animated-heading__text').text(data[0]);
51          var index = 1;
52
53          function flipText() {
54            textElement.addClass("flip-out");
55
56            setTimeout(function () {
57              textElement.find('.rkit-animated-heading__text').text(data[index]);
58              textElement.removeClass("flip-out");
59              textElement.addClass("flip-in");
60            }, 500);
61
62            setTimeout(function () {
63              textElement.removeClass("flip-in");
64              index = (index + 1) % data.length;
65            }, 1000);
66          }
67
68          setInterval(flipText, duration);
69        });
70
71        $scope.find(".text-sliding_down").each(function () {
72          var textElement = $(this);
73          var data = JSON.parse(textElement.attr("data-type"));
74          textElement.find('.rkit-animated-heading__text').text(data[0]);
75          var index = 1;
76
77          function slideUpText() {
78            textElement.addClass("slide-down_out");
79
80            setTimeout(function () {
81              textElement.find('.rkit-animated-heading__text').text(data[index]);
82              textElement.removeClass("slide-down_out");
83              textElement.addClass("slide-down_in");
84            }, 500);
85
86            setTimeout(function () {
87              textElement.removeClass("slide-down_in");
88              index = (index + 1) % data.length;
89            }, 1000);
90          }
91
92          setInterval(slideUpText, duration);
93        });
94
95        $scope.find(".text-sliding_up").each(function () {
96          var textElement = $(this);
97          var data = JSON.parse(textElement.attr("data-type"));
98          textElement.find('.rkit-animated-heading__text').text(data[0]);
99          var index = 1;
100
101          function slideUpText() {
102            textElement.addClass("slide-up_out");
103
104            setTimeout(function () {
105              textElement.find('.rkit-animated-heading__text').text(data[index]);
106              textElement.removeClass("slide-up_out");
107              textElement.addClass("slide-up_in");
108            }, 500);
109
110            setTimeout(function () {
111              textElement.removeClass("slide-up_in");
112              index = (index + 1) % data.length;
113            }, 1000);
114          }
115
116          setInterval(slideUpText, duration);
117        });
118
119        $scope.find(".rkit-highlighted").each(function () {
120          var textElement = $(this);
121          var data = JSON.parse(textElement.attr("data-type"));
122          var txt = $("<p>" + data[0] + "</p>");
123          textElement.find('.rkit-animated-heading__text').append(txt);
124          textElement.addClass("highlighted_in");
125          var index = 1;
126
127          function animation() {
128            setTimeout(function () {
129              textElement.removeClass("highlighted_in");
130              textElement.addClass("highlighted_out");
131            }, 1000);
132
133            setTimeout(function () {
134              textElement.find('.rkit-animated-heading__text').find("p").remove();
135              var text = $("<p>" + data[index] + "</p>");
136              textElement.find('.rkit-animated-heading__text').append(text);
137              textElement.removeClass("highlighted_out");
138              textElement.addClass("highlighted_in");
139            }, 1500);
140
141            setTimeout(function () {
142              index = (index + 1) % data.length;
143            }, 2000);
144          }
145
146          setInterval(animation, duration);
147        });
148
149        $scope.find(".text-drop-in").each(function () {
150          var textElement = $(this);
151          var data = JSON.parse(textElement.attr("data-type"));
152          textElement.find('.rkit-animated-heading__text').text(data[0]);
153          var index = 1;
154
155          function dropInText() {
156            textElement.addClass("drop-in_out");
157
158            setTimeout(function () {
159              textElement.find('.rkit-animated-heading__text').text(data[index]);
160              textElement.removeClass("drop-in_out");
161              textElement.addClass("drop-in_in");
162            }, 500);
163
164            setTimeout(function () {
165              textElement.removeClass("drop-in_in");
166              index = (index + 1) % data.length;
167            }, 1000);
168          }
169
170          setInterval(dropInText, duration);
171        });
172
173        $scope.find(".text-drop-out").each(function () {
174          var textElement = $(this);
175          var data = JSON.parse(textElement.attr("data-type"));
176          textElement.find('.rkit-animated-heading__text').text(data[0]);
177          var index = 1;
178
179          function dropOutText() {
180            textElement.addClass("drop-out_out");
181
182            setTimeout(function () {
183              textElement.find('.rkit-animated-heading__text').text(data[index]);
184              textElement.removeClass("drop-out_out");
185              textElement.addClass("drop-out_in");
186            }, 500);
187
188            setTimeout(function () {
189              textElement.removeClass("drop-out_in");
190              index = (index + 1) % data.length;
191            }, 1000);
192          }
193
194          setInterval(dropOutText, duration);
195        });
196      });
197    }
198  );
199});

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.