git.shiar.nl
/
sheet.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
| inline |
side by side
word/memory: celebration animation on completion
[sheet.git]
/
word
/
memory.js
diff --git
a/word/memory.js
b/word/memory.js
index 0e523a1c7857fa7832abd14d6f180dd7a13ca27a..c3adfd4590d3d7dd6e4edc519620a84b8442b78f 100644
(file)
--- a/
word/memory.js
+++ b/
word/memory.js
@@
-26,6
+26,9
@@
class WordMemory {
// lock both as correct
this.turned.forEach(card => put(card, '.good![onclick]'));
this.turned = [];
+ if (Array.from(this.form.children).every(card => card.classList.contains('good'))) {
+ put(this.form, '.good');
+ }
return;
}