-
Notifications
You must be signed in to change notification settings - Fork 0
/
app.js
32 lines (27 loc) · 658 Bytes
/
app.js
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
document.addEventListener('DOMContentLoaded', function (event) {
console.log('DOM loaded')
// On load with event listener
window.addEventListener(
'load',
function (e) {
// Custom GSAP code goes here
gsap.to('.my-element', {
rotation: 360,
duration: 2,
ease: 'bounce.out',
})
console.log('window loaded')
},
false
)
// On load with arrow functions
window.onload = () => {
console.log('window loaded')
}
})
// <div id="smooth-wrapper">
// <div id="smooth-content">
// <!--- ALL YOUR CONTENT HERE --->
// </div>
// </div>
// <!-- position: fixed elements can go outside -->