save
This commit is contained in:
@@ -83,9 +83,27 @@ function inputTwo(main, inputTwo) {
|
||||
|
||||
button.onclick = function () {
|
||||
input.checked = (input.checked == false) ? true : false;
|
||||
}
|
||||
|
||||
if (button.dataset.content) {
|
||||
let content = button.dataset.content,
|
||||
childrens = document.querySelector(`.${content}`).children;
|
||||
|
||||
Object.keys(childrens).forEach(blockId => {
|
||||
let block = childrens[blockId];
|
||||
|
||||
if (block.classList.contains('active')) {
|
||||
block.classList.remove('active');
|
||||
}else{
|
||||
block.classList.add('active');
|
||||
}
|
||||
})
|
||||
|
||||
|
||||
// .forEach(block => {
|
||||
//
|
||||
// })
|
||||
}
|
||||
}
|
||||
})
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user