diff --git a/01 - JavaScript Drum Kit/index-START.html b/01 - JavaScript Drum Kit/index-START.html index 8a2f8e8417..11eaf5c7c0 100644 --- a/01 - JavaScript Drum Kit/index-START.html +++ b/01 - JavaScript Drum Kit/index-START.html @@ -1,67 +1,86 @@ - - - JS Drum Kit - - - - - - -
-
- A - clap -
-
- S - hihat -
-
- D - kick -
-
- F - openhat -
-
- G - boom -
-
- H - ride -
-
- J - snare -
-
- K - tom -
-
- L - tink + + + JS Drum Kit + + + + +
+
+ A + clap +
+
+ S + hihat +
+
+ D + kick +
+
+ F + openhat +
+
+ G + boom +
+
+ H + ride +
+
+ J + snare +
+
+ K + tom +
+
+ L + tink +
-
- - - - - - - - - + + + + + + + + + - + function removeTransition(e) { + console.log(e); + if (e.propertyName !== "transform") return; //skip if its not a transform + this.classList.remove("playing"); + } + const keys = document.querySelectorAll(".key"); + keys.forEach((key) => + key.addEventListener("transitionend", removeTransition) + ); - + window.addEventListener("keydown", playSound); + + diff --git a/02 - JS and CSS Clock/index-START.html b/02 - JS and CSS Clock/index-START.html index 55ab1a5331..5fb7b24f60 100644 --- a/02 - JS and CSS Clock/index-START.html +++ b/02 - JS and CSS Clock/index-START.html @@ -1,13 +1,11 @@ - - - JS + CSS Clock - - - - - + + + JS + CSS Clock + + +
@@ -16,60 +14,80 @@
+ - .hand { - width: 50%; - height: 6px; - background: black; - position: absolute; - top: 50%; - } + - + setInterval(setDate, 1000); + + diff --git a/03 - CSS Variables/index-START.html b/03 - CSS Variables/index-START.html index d5fcc3a2ae..606cfd7840 100644 --- a/03 - CSS Variables/index-START.html +++ b/03 - CSS Variables/index-START.html @@ -1,52 +1,102 @@ - - - Scoped CSS Variables and JS - - - -

Update CSS Variables with JS

+ + + Scoped CSS Variables and JS + + + +

Update CSS Variables with JS

-
- - +
+ + - - + + - - -
+ + +
- + - - .controls { - margin-bottom: 50px; - } + + inputs.forEach((input) => { + input.addEventListener("change", handleUpdate); + }); + inputs.forEach((input) => { + input.addEventListener("mousemove", handleUpdate); + }); - + handleUpdate(); + +