We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 6fbb125 commit 58f63f1Copy full SHA for 58f63f1
7-animation/2-css-animations/1-animate-logo-css/solution.view/index.html
@@ -27,14 +27,14 @@
27
<img id="flyjet" src="https://en.js.cx/clipart/flyjet.jpg">
28
29
<script>
30
- flyjet.onclick = function() {
+ let ended = false; // will change to true after the animation finishes
31
32
- let ended = false;
+ flyjet.onclick = function() {
33
34
flyjet.addEventListener('transitionend', function() {
35
- if (!ended) {
+ if (!ended) { // check to show the message only once
36
ended = true;
37
- alert('Feito!');
+ alert('Done!');
38
}
39
});
40
0 commit comments