-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathscript.js
More file actions
47 lines (41 loc) · 1.01 KB
/
Copy pathscript.js
File metadata and controls
47 lines (41 loc) · 1.01 KB
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
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
const logo = document.querySelector('.logoName')
const $arrow = $('.arrow')
const arrow = $('.arrow').get(0)
const $content = $('.content')
const $projects = $('.projects')
const $details = $('.details')
function onLoad() {
window.onload = () => {
$details.hide()
$arrow.hide()
$content.hide()
$projects.hide()
setTimeout(() => {
logo.classList.toggle('highlighted')
}, 700);
setTimeout(() => {
$arrow.show(1000)
}, 1900);
}
}
function showContent() {
arrow.addEventListener('click', () => {
$content.slideToggle(1000)
setTimeout(() => {
$projects.slideDown(1400)
}, 1500);
})
}
function showProjectDetails() {
$projects.children().each((i, e) => {
$(e).on('mouseenter', () => {
$($details.get(i)).slideDown(700)
})
$(e).on('mouseleave', () => {
$($details.get(i)).slideUp(700)
})
})
}
onLoad()
showContent()
showProjectDetails()