-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathindex.js
More file actions
19 lines (17 loc) · 760 Bytes
/
index.js
File metadata and controls
19 lines (17 loc) · 760 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
const navBar = document.querySelector('.navbar')
const content = document.querySelector('#content-container')
const footer = document.querySelector('.footer')
function renderPage(event) {
const target = event.target
let rawHTML = ''
if (target.matches('.project-1')) {
window.open("https://scheng0718.github.io/adele-power/", "_blank");
} else if (target.matches('.project-2')) {
window.open("https://scheng0718.github.io/boba_tea_lover/", "_blank");
} else if (target.matches('.project-3')) {
window.open("https://scheng0718.github.io/world_of_cinema/", "_blank");
} else if (target.matches('.project-4')) {
window.open("https://scheng0718.github.io/stay_organized/", "_blank");
}
}
footer.addEventListener('click', renderPage)