PageSourceSearch

https://jovaki.com/wp-content/themes/agron/elements/assets/js/elementor.js?ver=1.0.0

js jovaki.com collected 2026-10-07 10:50:49 UTC 5,030 bytes, 135 lines download raw bytes

1( function( $ ) {
2    "use strict";
3
4    function agronElAfterRender(){
5        let _elementor = typeof elementor != 'undefined' ? elementor : elementorFrontend;
6        _elementor.hooks.addFilter('pxl_element_container/after-render', function(ouput, settings) {
7        });
8    } 
9
10    function agronElBeforeRender(){
11        let _elementor = typeof elementor != 'undefined' ? elementor : elementorFrontend;
12        
13        _elementor.hooks.addFilter( 'pxl_element_container/before-render', function( output, settings) {
14            if(typeof settings.pxl_background_image != 'undefined' && settings.pxl_background_image.url != ''){
15                output += '<div class="pxl-background"></div>';
16            }
17            return output;
18        });
19    } 
20
21    function cursorSpotlight() {
22        if(!$('.cursor-spotlight').length) return;
23        $('.cursor-spotlight').on('mousemove', function(e) {
24            const mouseX = e.offsetX;
25            const mouseY = e.offsetY;    
26            gsap.to(this, {
27                '--pxl-translate-x': `${mouseX}px`,
28                '--pxl-translate-y': `${mouseY}px`,
29                '--pxl-box-size': '200px',
30                duration: 0.3, 
31                ease: 'power2.out', 
32            });
33        });
34    
35        $('.cursor-spotlight').on('mouseleave', function(e) {
36            gsap.to(this, {
37                '--pxl-box-size': '0px',
38                duration: 0.5,
39                ease: 'power2.out', 
40            });
41        });
42    }
43
44    function onScrollTranslateX() {
45        let el = $('.scroll-marquee-animation .pxl-text-marquee-item');
46        if (!el.length) return;
47        let parent = el.closest('.elementor-element');
48        let moveDistance = (el.outerWidth() > $(parent).width()) ? $(parent).width() - el.outerWidth() : 0;
49        gsap.to(el, {
50            x: moveDistance,
51            ease: "none",
52            duration: 5,
53            scrollTrigger: {
54                trigger: parent,
55                start: "bottom bottom",
56                end: `top center`,
57                scrub: 2.5,
58                pinSpacing: true,
59                anticipatePin: 1,
60                pinReparent: true,
61            }
62        });
63    }
64
65    function initCarouselFade() {
66        let elements = $('.pxl-carousel');
67        elements.each(function() {
68            let navigationButtons = $(this).find('.navigation-button');
69            let items = $(this).find('.carousel-item');
70            navigationButtons.on('click', function(e) {
71                e.preventDefault();
72                let currentIndex = items.index($('.carousel-item.active'));
73                if ($(this).hasClass('navigation-button-next')) {
74                    let nextIndex = currentIndex + 1;
75                    items.eq(currentIndex).removeClass('active');
76                    if( nextIndex >= items.length) {
77                        nextIndex = 0;
78                    }
79                    items.eq(nextIndex).addClass('active');
80                } else {
81                    let previousIndex = currentIndex - 1;
82                    items.eq(currentIndex).removeClass('active'); 
83                    if(previousIndex < 0) {
84                        previousIndex = items.length - 1;
85                    }
86                    items.eq(previousIndex).addClass('active');
87                }
88            });
89        });
90    }
91
92    function initScrollBasedParallax() {
93        const els = $('[data-based-parallax]');
94        if (!els.length || $(window).width() <= 991) return;
95        els.each(function (i, el) {
96            const params = $(el).data('based-parallax');
97            let parent = $(el).closest('.e-con.elementor-element');
98            $(parent).css({'overflow' : 'hidden', 'position' : 'relative'});
99            const x = parseFloat(params.x) || 0;
100            const y = parseFloat(params.y) || 0;
101            const rotate = parseFloat(params.rotate) || 0;
102            const scale = parseFloat(params.scale) || 1;
103            if (x > 0) gsap.set(el, { left: -x });
104            if (x < 0) gsap.set(el, { right: x });
105            if (y > 0) gsap.set(el, { top: -y });
106            if (y < 0) gsap.set(el, { bottom: y });     
107            gsap.to(el, {
108                x: x,
109                y: y,
110                rotate: rotate,
111                scale: scale,
112                ease: "none",
113                duration: 0.25,
114                scrollTrigger: {
115                    trigger: parent,
116                    start: "top 90%",
117                    end: "bottom 10%",
118                    scrub: true,
119                },
120            });
121        });
122        // ScrollTrigger.refresh();
123    }
124
125    $( window ).on( 'elementor/frontend/init', function() {
126        agronElAfterRender();
127        agronElBeforeRender()
128        cursorSpotlight()
129        onScrollTranslateX()
130        initCarouselFade()
131        initScrollBasedParallax()
132    });
133
134
135} )( jQuery );

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.