PageSourceSearch

https://wearebombo.com/wp-content/plugins/rometheme-for-elementor/widgets/assets/js/counter.js?ver=1.6.8

js wearebombo.com collected 2026-09-24 10:46:15 UTC 2,745 bytes, 70 lines download raw bytes

1jQuery(window).on('elementor/frontend/init', function () {
2    elementorFrontend.hooks.addAction('frontend/element_ready/rkit-counter.default', function ($scope, $) {
3        var counter = $scope.find('.rkit-counter');
4        var count = counter.data('start');
5        var targetCount = counter.data('value'); // Target value
6        var animationDuration = counter.data('duration'); // in milliseconds
7        var dataSeparator = counter.data('separator');
8        var step = (counter.data('step')) ? counter.data('step') : 1;
9
10        var separator;
11
12        switch (dataSeparator.separator) {
13            case 'comma':
14                separator = ",";
15                break;
16            case 'dot':
17                separator = ".";
18                break;
19            case 'underline':
20                separator = "_";
21                break;
22            case 'space':
23                separator = " ";
24                break;
25            case 'apostrophe':
26                separator = "'";
27                break;
28            default:
29                separator = "";
30                break;
31        }
32
33        function numberWithCommas(x) {
34            return x.toString().replace(/\B(?=(\d{3})+(?!\d))/g, separator);
35        }
36
37        function animateCounter() {
38            var currentNumber = count;
39            var interval = setInterval(function () {
40                currentNumber += step;
41                var text = (dataSeparator.thousand_separator) ? numberWithCommas(currentNumber) : currentNumber ; 
42                var targetText =  (dataSeparator.thousand_separator) ? numberWithCommas(targetCount) : targetCount ;
43                if (currentNumber <= targetCount) {
44                    counter.find(".count").text(text);
45                } else {
46                    counter.find(".count").text(targetText);
47                    clearInterval(interval); // Stop the interval when reaching targetCount
48                }
49            }, animationDuration / ((targetCount - count) / step));
50        }
51
52        // Use Intersection Observer to trigger animation when element is in viewport
53        var options = {
54            root: null,
55            rootMargin: "0px",
56            threshold: 0.75 // Intersection ratio required to trigger the callback
57        };
58
59        var observer = new IntersectionObserver(function (entries, observer) {
60            entries.forEach(function (entry) {
61                if (entry.isIntersecting) {
62                    animateCounter();
63                    observer.unobserve(entry.target); // Stop observing after triggering once
64                }
65            });
66        }, options);
67
68        observer.observe(counter[0]);
69    });
70});

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.