diff --git a/01 - JavaScript Drum Kit/index-START.html b/01 - JavaScript Drum Kit/index-START.html index 4070d32767..de7fac4e68 100644 --- a/01 - JavaScript Drum Kit/index-START.html +++ b/01 - JavaScript Drum Kit/index-START.html @@ -58,9 +58,24 @@ - + const key = document.querySelector(`.key[data-key="${e.keyCode}"]`); + key.classList.add('playing'); + }) + // attaching all the events at the start + const keys = document.querySelectorAll('.key'); + keys.forEach((key) => { + key.addEventListener('transitionend', function(e){ + if(e.propertyName !== 'transform') return; + key.classList.remove('playing'); + }) + }) + diff --git a/02 - JS + CSS Clock/index-START.html b/02 - JS + CSS Clock/index-START.html index 259280d228..012f78e43e 100644 --- a/02 - JS + CSS Clock/index-START.html +++ b/02 - JS + CSS Clock/index-START.html @@ -61,12 +61,35 @@ background:black; position: absolute; top:50%; + transform-origin: 100%; + transform: rotate(90deg); + transition: all 0.05s; + transition-timing-function: cubic-bezier(0.1, 2.7, 0.58, 1); } diff --git a/03 - CSS Variables/index-START.html b/03 - CSS Variables/index-START.html index bf0f33e3ba..6457da721b 100644 --- a/03 - CSS Variables/index-START.html +++ b/03 - CSS Variables/index-START.html @@ -22,9 +22,17 @@

Update CSS Variables with JS