-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathdefault.js
32 lines (22 loc) · 993 Bytes
/
default.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
// const imgUrlList = ['../images/bg01.jpg','../images/bg02.png','../images/bg03.png','../images/bg04.jpg','../images/bg05.png'];
// const backgroundImgEl = document.querySelector('.backgroundImg');
// const snowEl = document.querySelector('.snow');
// const tableEl = document.querySelector('.table');
// const hideEl = (el)=>el.classList.add('hide')
// const showEl = (el)=>el.classList.remove('hide')
// const makeDisplayNoneEl = (el)=>el.classList.add('none')
// const showChosedBg = (id)=>{
// const bgUrl = imgUrlList[id];
// backgroundImgEl.style.backgroundImage =`url(${bgUrl})`
// if(id===4) backgroundImgEl.classList.add('lastBg')
// else backgroundImgEl.classList.remove('lastBg')
// showEl(backgroundImgEl);
// }
// tableEl.addEventListener('click', (e)=>{
// const bgItem = e.target.closest('[data-cell]')
// if(!bgItem) return;
// const bgID = +(bgItem.dataset.cell);
// makeDisplayNoneEl(tableEl);
// showChosedBg(bgID);
// showEl(snowEl);
// })