-
Notifications
You must be signed in to change notification settings - Fork 0
/
portfolio.js
32 lines (27 loc) · 1.04 KB
/
portfolio.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
// console.log("ndnf")
// document.querySelector('.cross').style.dispaly ='none';
document.querySelector('.cross').style.display='none';
document.querySelector('.hambuger ').addEventListener("click", ()=>{
document.querySelector('.sidebar').classList.toggle('sidebargo');
if (document.querySelector('.sidebar').classList.contains('sidebargo' ) ) {
setTimeout(()=>{
document.querySelector('.ham') . style .display=' inline'
},300);
document.querySelector('.cross') . style .display=' none'
}
else
{
document.querySelector('.ham') . style .display=' none'
setTimeout(()=>{
document.querySelector('.cross') . style .display=' inline'
},298);
}
})
let arr =[ 'bd', 'a', 'b','c','d'];
let t=document.getElementsByTagName("body")[0];
t.className=arr[0];
function color(){
let id=Math.floor(Math.random()*arr.length);
t.className=arr[id];
}
setInterval(color, 2000);