-
Notifications
You must be signed in to change notification settings - Fork 4
/
code.js
42 lines (38 loc) · 1002 Bytes
/
code.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
33
34
35
36
37
38
39
40
41
42
window.addEventListener('resize', function(){
if( window.innerHeight != screen.height){
elem.style['visibility']='hidden';
elem.style['display']='none';
elem.pause();
}
})
function btn(link){
location.href = link;
}
function showorhide(id) {
if (document.getElementById(id).style.display == 'none'){
document.getElementById(id).style.display = 'block';
}
else{
document.getElementById(id).style.display = 'none';
}
}
function openvid(val) {
elem = document.getElementById('myvideo');
if (elem.requestFullscreen) {
elem.style['visibility']='visible';
elem.style['display']='unset';
elem.setAttribute('src', val)
elem.load();
elem.play();
elem.requestFullscreen();
}
}
window.addEventListener('scroll', function(){
var scroll = document.querySelector('.up');
scroll.classList.toggle("active", window.scrollY > window.innerHeight)
})
function totop(){
window.scrollTo({
top: 0
})
}