- Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathscript.js
More file actions
Latest commit
26 lines (14 loc) · 502 Bytes
/
Copy pathscript.js
File metadata and controls
26 lines (14 loc) · 502 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
varouterContainer=document.getElementById("outer-container");
functionscaleToWindow(){
if(window.innerWidth>window.innerHeight){
outerContainer.style.height=window.innerHeight*0.8+"px";
outerContainer.style.width=outerContainer.style.height;
}else{
outerContainer.style.width=window.innerWidth*0.8+"px";
outerContainer.style.height=outerContainer.style.width;
}
}
window.addEventListener('resize',scaleToWindow);
$(()=>{
scaleToWindow();
});