We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 31a59fd commit 1bd718dCopy full SHA for 1bd718d
01 - JavaScript Drum Kit/index-START.html
@@ -59,8 +59,6 @@
59
60
<script>
61
62
- window.addEventListener('keydown', playSound);
63
-
64
function playSound(e){
65
const audio = document.querySelector(`audio[data-key="${e.keyCode}"]`);
66
const key = document.querySelector(`.key[data-key="${e.keyCode}"]`);
@@ -78,6 +76,7 @@
78
76
79
77
const keys = document.querySelectorAll('.key');
80
keys.forEach(key => key.addEventListener('transitionend',removeTransititon));
+ window.addEventListener('keydown', playSound);
81
82
</script>
83
0 commit comments