Skip to content

Commit

Permalink
fix color continuing after user uncheck checkbox
Browse files Browse the repository at this point in the history
  • Loading branch information
IgorRSGraziano committed Jan 9, 2022
1 parent 249ff53 commit bab9e6f
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions script.js
Original file line number Diff line number Diff line change
Expand Up @@ -87,6 +87,11 @@ formCheckbox.addEventListener('click', (e) => {
const checkBox = e.target
document.querySelector(".form-color-selector").classList.toggle('hide')
addTagDiagonalsMatrix(matrixTable)

//Limpa o estilo dinámico aplicado inline pela função "updateBackgroundColor"
document.querySelectorAll('.matrix-table tr td').forEach(el => {
el.style.backgroundColor = 'initial'
})
})


Expand Down

0 comments on commit bab9e6f

Please sign in to comment.