PageSourceSearch

https://paradromics.com/wp-content/themes/paradromics/js/animations.js?cache=1790913094

js paradromics.com collected 2026-10-02 04:06:20 UTC 6,063 bytes, 196 lines download raw bytes

1jQuery(document).ready(function ($) {
2    
3    var isMobile = window.innerWidth < 768;
4    
5    if (!isMobile) {
6        gsap.registerPlugin(ScrollTrigger, ScrollSmoother, SplitText);
7        var smoother = ScrollSmoother.create({
8            wrapper: "#smooth-wrapper",
9            content: "#smooth-content",
10            smooth: 1.2,
11            smoothTouch: 0,
12            effects: true,
13        });
14    }
15
16    // Global smooth-scroll helper. Pass a selector string, element, or y-offset.
17    window.smoothScrollTo = function (target, offset) {
18        offset = offset || 0;
19        if (smoother) {
20            smoother.scrollTo(target, true, 'top ' + offset + 'px');
21        } else {
22            var el = typeof target === 'string' ? document.querySelector(target) : target;
23            if (el) el.scrollIntoView({ behavior: 'smooth' });
24        }
25    };
26
27    
28
29    // Auto-wire any same-page anchor link across the whole site.
30    // Links to other pages (href="/page#section") are left alone.
31    document.addEventListener('click', function (e) {
32        var link = e.target.closest('a[href^="#"]');
33        if (!link) return;
34        var hash = link.getAttribute('href');
35        if (hash === '#') return;
36        var target = document.querySelector(hash);
37        if (!target) return;
38        e.preventDefault();
39        window.smoothScrollTo(target);
40    });
41
42    document.fonts.ready.then(function () {
43        gsap.utils.toArray('.anim-lines').forEach(function (el) {
44            var split = new SplitText(el, { type: 'lines' });
45            gsap.from(split.lines, {
46                opacity: 0,
47                y: 16,
48                duration: 0.9,
49                ease: 'power2.out',
50                stagger: 0.12,
51                scrollTrigger: {
52                    trigger: el,
53                    start: 'top 85%',
54                }
55            });
56        });
57        gsap.utils.toArray('.anim-letters').forEach(function (el) {
58            var split = new SplitText(el, { type: 'chars,words' });
59            gsap.from(split.chars, {
60                opacity: 0,
61                y: 14,
62                duration: 1,
63                ease: 'power1.out',
64                stagger: 0.03,
65                scrollTrigger: {
66                    trigger: el,
67                    start: 'top 85%',
68                }
69            });
70        });
71
72        ScrollTrigger.refresh();
73
74        // Scroll to hash on initial page load after layout is ready.
75        if (window.location.hash) {
76            var hashTarget = document.querySelector(window.location.hash);
77            if (hashTarget) window.smoothScrollTo(hashTarget);
78        }
79    });
80
81    gsap.utils.toArray('.anim-icon-section').forEach(function (section) {
82        var tl = gsap.timeline({
83            scrollTrigger: {
84                trigger: section,
85                start: 'top 70%',
86            }
87        });
88
89        tl
90            .from(section.querySelector('.anim-icon-l'), {
91                opacity: 0,
92                x: 300,
93                duration: 1,
94                ease: 'power3.out',
95            }, 0)
96            .from(section.querySelector('.anim-icon-r'), {
97                opacity: 0,
98                x: -300,
99                duration: 1,
100                ease: 'power3.out',
101            }, 0)
102            .from(section.querySelector('.anim-label'), {
103                opacity: 0,
104                y: 14,
105                duration: 0.7,
106                ease: 'power2.out',
107            }, 0.45)
108            .from(section.querySelector('.anim-heading'), {
109                opacity: 0,
110                y: 14,
111                duration: 0.7,
112                ease: 'power2.out',
113            }, 0.62);
114    });
115
116    gsap.from('.sep', {
117        height: 1,
118        duration: 1.2,
119        ease: 'power2.out',
120        scrollTrigger: {
121            trigger: '.sep',
122            start: 'top 80%',
123        }
124    });
125
126
127    if (document.querySelector('.dv-history-slide')) {
128        gsap.from('.dv-history-slide .dv-history-slide-item', {
129            opacity: 0,
130            x: 80,
131            duration: 1.25,
132            ease: 'power2.out',
133            stagger: 0.1,
134            scrollTrigger: {
135                trigger: '.dv-history-slide',
136                start: 'top 80%',
137            }
138        });
139    }
140
141    var lottieEl = document.getElementById('lottie-product-animation');
142
143    if (lottieEl && typeof lottie !== 'undefined') {
144        fetch(lottieProductPath)
145            .then(function (r) { return r.json(); })
146            .then(function (animationData) {
147                var productAnim = lottie.loadAnimation({
148                    container: lottieEl,
149                    renderer: 'canvas',
150                    loop: false,
151                    autoplay: false,
152                    animationData: animationData,
153                });
154
155                productAnim.addEventListener('DOMLoaded', function () {
156                    var frames = productAnim.totalFrames;
157
158                    ScrollTrigger.create({
159                        trigger: '.dv-connexu-section',
160                        start: 'top top',
161                        end: '+=' + (frames * 8),
162                        pin: !isMobile,
163                        scrub: 1,
164                        onUpdate: function (self) {
165                            productAnim.goToAndStop(Math.round(self.progress * (frames - 1)), true);
166                        },
167                    });
168                });
169            });
170    }
171
172    if (!isMobile && document.querySelector('.careers-value-sec')) {
173        ScrollTrigger.create({
174            trigger: '.careers-value-sec',
175            start: 'top 70px',
176            end: 'bottom bottom',
177            pin: '.careers-value-main .left',
178            pinSpacing: false,
179        });
180    }
181
182    gsap.utils.toArray('.dv-line').forEach(function (el) {
183        gsap.to(el, {
184            '--line-h': '176px',
185            duration: 1.2,
186            ease: 'power2.out',
187            scrollTrigger: {
188                trigger: el,
189                start: 'top 80%',
190            }
191        });
192    });
193
194    
195
196});

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.