Skip to content

Commit 58f63f1

Browse files
committed
Update "CSS-animations" files
1 parent 6fbb125 commit 58f63f1

File tree

1 file changed

+4
-4
lines changed
  • 7-animation/2-css-animations/1-animate-logo-css/solution.view

1 file changed

+4
-4
lines changed

7-animation/2-css-animations/1-animate-logo-css/solution.view/index.html

+4-4
Original file line numberDiff line numberDiff line change
@@ -27,14 +27,14 @@
2727
<img id="flyjet" src="https://en.js.cx/clipart/flyjet.jpg">
2828

2929
<script>
30-
flyjet.onclick = function() {
30+
let ended = false; // will change to true after the animation finishes
3131

32-
let ended = false;
32+
flyjet.onclick = function() {
3333

3434
flyjet.addEventListener('transitionend', function() {
35-
if (!ended) {
35+
if (!ended) { // check to show the message only once
3636
ended = true;
37-
alert('Feito!');
37+
alert('Done!');
3838
}
3939
});
4040

0 commit comments

Comments
 (0)