Skip to content

Commit e09fa7f

Browse files
author
Jin Xu
committed
cource wesbos#1 done
1 parent 8010f0f commit e09fa7f

File tree

2 files changed

+47
-16
lines changed

2 files changed

+47
-16
lines changed

01 - JavaScript Drum Kit/index-START.html

Lines changed: 13 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -58,7 +58,19 @@
5858
<audio data-key="76" src="sounds/tink.wav"></audio>
5959

6060
<script>
61-
61+
window.onload = function(){
62+
window.addEventListener('keydown', function(e){
63+
var keyNum = e.keyCode;
64+
document.querySelector('.key[data-key="'+keyNum+'"]').classList.add('playing')
65+
var audio = document.querySelector('audio[data-key="'+keyNum+'"]');
66+
audio.currentTime = 0;
67+
audio.play();
68+
})
69+
window.addEventListener('keyup', function(e){
70+
var keyNum = e.keyCode;
71+
document.querySelector('.key[data-key="'+keyNum+'"]').classList.remove('playing')
72+
})
73+
}
6274
</script>
6375

6476

readme.md

Lines changed: 34 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -1,17 +1,36 @@
1-
![](https://javascript30.com/images/JS3-social-share.png)
2-
31
# JavaScript30
42

5-
Starter Files + Completed solutions for the JavaScript 30 Day Challenge.
6-
7-
Grab the course at [https://JavaScript30.com](https://JavaScript30.com)
8-
9-
Text-based guides (unofficial) for the challenges can be found here - [Text Guides](https://github.com/nitishdayal/JavaScript30).
10-
11-
## Pull Requests
12-
13-
These are meant to be 1:1 copies of what is done in the video. If you found a better / different way to do things, great, but I will be keeping them the same as the videos.
14-
15-
The starter files + solutions will be updated if/when the videos are updated.
16-
17-
Thanks!
3+
> Course [JavaScript30](https://javascript30.com) created by [Wes Bos](https://github.com/wesbos)
4+
5+
> Folked repo for practice and fun!
6+
7+
1. [x] ~~JavaScript Drum Kit~~
8+
2. [ ] JS + CSS Clock
9+
3. [ ] CSS Variables
10+
4. [ ] Array Cardio, Day 1
11+
5. [ ] Flex Panel Gallery
12+
6. [ ] Type Ahead
13+
7. [ ] Array Cardio, Day 2
14+
8. [ ] Fun with HTML5 Canvas
15+
9. [ ] Dev Tools Domination
16+
10. [ ] Hold Shift and Check Checkboxes
17+
11. [ ] Custom Video Player
18+
12. [ ] Key Sequence Detection
19+
13. [ ] Slide in on Scroll
20+
14. [ ] JavaScript References vs. Copying
21+
15. [ ] LocalStorage
22+
16. [ ] Mouse Move Shadow
23+
17. [ ] Sort Without Articles
24+
18. [ ] Adding Up Times with Reduce
25+
19. [ ] Webcam Fun
26+
20. [ ] Speech Detection
27+
21. [ ] Geolocation
28+
22. [ ] Follow Along Link Highlighter
29+
23. [ ] Speech Synthesis
30+
24. [ ] Sticky Nav
31+
25. [ ] Event Capture, Propagation, Bubbling, and Once
32+
26. [ ] Stripe Follow Along Nav
33+
27. [ ] Click and Drag
34+
28. [ ] Video Speed Controller
35+
29. [ ] Countdown Timer
36+
30. [ ] Whack A Mole

0 commit comments

Comments
 (0)