sync
This commit is contained in:
@@ -0,0 +1,14 @@
|
||||
document.querySelectorAll('div').forEach((d) => {
|
||||
d.style.backgroundColor = 'black';
|
||||
d.addEventListener('click', populate);
|
||||
})
|
||||
|
||||
function populate() {
|
||||
if (this.style.backgroundColor === 'black') {
|
||||
this.style.backgroundColor = 'red';
|
||||
this.style.borderRadius = '50%';
|
||||
} else {
|
||||
this.style.backgroundColor = 'black';
|
||||
this.style.borderRadius = '0%';
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user