-
Notifications
You must be signed in to change notification settings - Fork 0
/
main.js
32 lines (29 loc) · 953 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
25
26
27
28
29
30
31
32
var nav = document.getElementById('navbar');
window.onscroll = function() {
if (window.pageYOffset > 100) {
nav.style.background = '#1a0628'
nav.style.boxShadow = '0px 4px 5px 0px rgba(0,0,0,0.75)'
}
else {
nav.style.boxShadow = '1px 1px 1px 1px #ff5338'
nav.style.background = 'transparent'
}
}
function openTab(evt, tabName) {
var i, bodytext, tablinks;
bodytext = document.getElementsByClassName("bodytext");
for (i = 0; i < bodytext.length; i++) {
bodytext[i].style.display = "none";
}
tablinks = document.getElementsByClassName("tablinks");
for (i = 0; i < bodytext.length; i++) {
tablinks[i].className = tablinks[i].className.replace(" active", "");
}
document.getElementById(tabName).style.display = "block";
evt.currentTarget.className += " active";
}
function changeImage() {
console.log("teste")
var image = document.getElementById("imgone");
image.changeImage = "./imgs/site2.png"
}