only flash wrong row when word not valid

This commit is contained in:
Akbar Rahman 2023-08-30 13:15:07 +01:00
parent 4405d97daf
commit faf71e5ed7
Signed by: alvierahman90
GPG Key ID: 20609519444A1269

View File

@ -43,8 +43,10 @@ function checkGridRow() {
console.log(rowWord)
if (!wordlist.valid_inputs.includes(rowWord)) {
body.classList.add("incorrect")
setTimeout( () => body.classList.remove("incorrect"), 500)
getGridRow(row).items.forEach(item => {
item.HTMLItem.classList.add("incorrect")
setTimeout( () => item.HTMLItem.classList.remove("incorrect"), 500)
})
return
}