PageSourceSearch

https://teamavoq.com/wp-content/themes/avoq/js/homepage-animations.js?ver=1785523347

js teamavoq.com collected 2026-10-02 17:28:06 UTC 1,623 bytes, 44 lines download raw bytes

1jQuery(function ($) {
2	if (typeof gsap === 'undefined' || typeof ScrollTrigger === 'undefined') {
3		return;
4	}
5	gsap.registerPlugin(ScrollTrigger);
6
7	// "More about us" section: image slides in from the left, text stacks in with a stagger.
8	const aboutImg = document.querySelector('.wp-image-3637');
9	if (aboutImg) {
10		const row = aboutImg.closest('.wp-block-columns');
11		const imgCol = aboutImg.closest('.wp-block-column');
12		const columns = row ? Array.from(row.querySelectorAll('.wp-block-column')) : [];
13		const textCol = columns.find(function (col) {
14			return col !== imgCol && col.querySelector('h2, p, .block-button');
15		});
16
17		if (row && imgCol && textCol) {
18			const textEls = textCol.querySelectorAll('h2, p, .block-button');
19
20			gsap.set(imgCol, { opacity: 0, x: -60, scale: 0.94 });
21			gsap.set(textEls, { opacity: 0, y: 24 });
22
23			ScrollTrigger.create({
24				trigger: row,
25				start: 'top 80%',
26				once: true,
27				onEnter: function () {
28					gsap.to(imgCol, { opacity: 1, x: 0, scale: 1, duration: 1, ease: 'power3.out' });
29					gsap.to(textEls, { opacity: 1, y: 0, duration: 0.8, stagger: 0.15, ease: 'power2.out', delay: 0.2 });
30				}
31			});
32		}
33	};
34
35	// h2.section-title's own "chomp" reveal now lives in section-title-animation.js,
36	// which is enqueued sitewide rather than gated to the homepage like this file.
37
38	// Late-loading images/webfonts can shift section heights after these triggers are
39	// created, throwing off their calculated scroll positions. Recalculate once everything
40	// has actually finished loading.
41	window.addEventListener('load', function () {
42		ScrollTrigger.refresh();
43	});
44});

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.