PageSourceSearch

https://www.hoc.gr/wp-content/themes/hoc/js/animations.js?ver=1790926840

js hoc.gr collected 2026-10-02 07:41:11 UTC 4,212 bytes, 162 lines download raw bytes

1// wait until DOM is ready
2document.addEventListener(
3 'DOMContentLoaded',
4 function (event) {
5  //  gsap.registerPlugin(ScrollTrigger)
6
7  // wait until images, links, fonts, stylesheets, and js is loaded
8  //  window.addEventListener(
9  //   'load',
10  //   function (e) {
11  //  if (window.TimelineLite) {
12  gsap.registerPlugin(ScrollTrigger)
13  //  }
14
15  const goup = gsap.utils.toArray('.goup')
16  goup.forEach((goupitem) => {
17   gsap.from(goupitem, {
18    y: 100,
19    lazy: false,
20    scrollTrigger: {
21     trigger: goupitem,
22     start: 'top bottom', // start when top of trigger target hits 50% point of viewport
23     toggleActions: 'restart none none reset',
24     end: 'top center',
25    },
26    duration: 1,
27    ease: 'ease-in',
28   })
29  })
30
31  const image = gsap.utils.toArray('.bloatimage')
32  image.forEach((imageItem) => {
33   gsap.from(imageItem, {
34    scale: 0,
35    lazy: false,
36    scrollTrigger: {
37     trigger: imageItem,
38     start: 'top bottom', // start when top of trigger target hits 50% point of viewport
39     toggleActions: 'restart none none reset',
40     end: 'top center',
41    },
42    duration: 1,
43    ease: 'ease-in',
44   })
45  })
46
47  const fromleft = gsap.utils.toArray('.fromleft')
48  fromleft.forEach((fromleftItem) => {
49   gsap.from(fromleftItem, {
50    x: -100,
51    lazy: false,
52    scrollTrigger: {
53     trigger: fromleftItem,
54     start: 'top bottom', // start when top of trigger target hits 50% point of viewport
55     toggleActions: 'restart none none reset',
56     end: 'top center',
57    },
58    duration: 1,
59    ease: 'ease-in',
60   })
61  })
62
63  const fromRight = gsap.utils.toArray('.fromright')
64  fromRight.forEach((fromrightItem) => {
65   gsap.from(fromrightItem, {
66    x: 100,
67    lazy: false,
68    scrollTrigger: {
69     trigger: fromrightItem,
70     start: 'top bottom', // start when top of trigger target hits 50% point of viewport
71     toggleActions: 'restart none none reset',
72     end: 'top center',
73    },
74    duration: 1,
75    ease: 'ease-in',
76   })
77  })
78
79  const verticaltitles = gsap.utils.toArray('.verticalan')
80  verticaltitles.forEach((vertItem) => {
81   if (window.matchMedia('(max-width: 991px)').matches) {
82    gsap.from(vertItem, {
83     x: 100,
84     lazy: false,
85     scrollTrigger: {
86      trigger: vertItem,
87      start: 'top bottom', // start when top of trigger target hits 50% point of viewport
88      toggleActions: 'restart none none reset',
89      end: 'top center',
90     },
91     duration: 1,
92     ease: 'ease-in',
93    })
94   }
95
96   if (window.matchMedia('(min-width: 992px)').matches) {
97    gsap.from(vertItem, {
98     y: 100,
99     lazy: false,
100     scrollTrigger: {
101      trigger: vertItem,
102      start: 'top bottom', // start when top of trigger target hits 50% point of viewport
103      toggleActions: 'restart none none reset',
104      end: 'top center',
105     },
106     duration: 1,
107     ease: 'ease-in',
108    })
109   }
110  })
111
112  const buttonsgoup = gsap.utils.toArray('.buttongoup')
113  buttonsgoup.forEach((buttonItem) => {
114   gsap.from(buttonItem, {
115    bottom: '-50px',
116    lazy: false,
117    scrollTrigger: {
118     trigger: buttonItem,
119     start: 'top bottom', // start when top of trigger target hits 50% point of viewport
120     toggleActions: 'restart none none reset',
121     end: 'top center',
122    },
123    duration: 1,
124    ease: 'ease-in',
125   })
126  })
127
128  const buttonsfromright = gsap.utils.toArray('.buttonfromright')
129  buttonsfromright.forEach((buttonfromRightItem) => {
130   gsap.from(buttonfromRightItem, {
131    right: '-50px',
132    lazy: false,
133    scrollTrigger: {
134     trigger: buttonfromRightItem,
135     start: 'top bottom', // start when top of trigger target hits 50% point of viewport
136     toggleActions: 'restart none none reset',
137     end: 'top center',
138    },
139    duration: 1,
140    ease: 'ease-in',
141   })
142  })
143
144  // const backtotop = gsap.utils.toArray('.backtotop')
145  // backtotop.forEach((backtotop) => {
146  //  gsap.from(backtotop, {
147  //   bottom: '-50px',
148  //   lazy: false,
149  //   scrollTrigger: {
150  //    trigger: 'body',
151  //    start: '2', // start when top of trigger target hits 50% point of viewport
152  //    toggleActions: 'play none none none',
153  //    end: 'top center',
154  //   },
155  //   duration: 1,
156  //   ease: 'ease-in',
157  //  })
158  // })
159 },
160 false
161)
162// })

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.