forked from nickby2/Desafio-1-2024.1-Frontend
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathmain.js
24 lines (20 loc) · 1012 Bytes
/
main.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
const btn_about = document.querySelector('#more_about');
const btn_experiences = document.querySelector('#btn_experiences');
const btn_projects = document.querySelector('#btn_projects');
const btn_contact = document.querySelector('#btn_contact');
const btn_form = document.querySelector('#btn_form');
btn_about.addEventListener('click', () => {
window.scroll({top: document.getElementById('skills').offsetTop, behavior: "smooth"});
});
btn_experiences.addEventListener('click', () => {
window.scroll({top: document.getElementById('experiences').offsetTop, behavior: "smooth"});
});
btn_projects.addEventListener('click', () => {
window.scroll({top: document.getElementById('projects').offsetTop, behavior: "smooth"});
});
btn_contact.addEventListener('click', () => {
window.scroll({top: document.getElementById('contact').offsetTop, behavior: "smooth"});
});
btn_form.addEventListener('click', () => {
window.scroll({top: document.getElementById('').offsetTop, behavior: "smooth"});
});