From 21a2cd481cc835679e0f4f21be2b6baceb459a1c Mon Sep 17 00:00:00 2001 From: anshusaurav Date: Wed, 11 Mar 2020 14:26:46 +0530 Subject: [PATCH 1/5] drum done --- 01 - JavaScript Drum Kit/index-START.html | 32 ++++++++++++++++++++++- 1 file changed, 31 insertions(+), 1 deletion(-) diff --git a/01 - JavaScript Drum Kit/index-START.html b/01 - JavaScript Drum Kit/index-START.html index 4070d32767..779814dc8c 100644 --- a/01 - JavaScript Drum Kit/index-START.html +++ b/01 - JavaScript Drum Kit/index-START.html @@ -58,7 +58,37 @@ From 893857b7d4687c3f05da1f780d5985a51580e86d Mon Sep 17 00:00:00 2001 From: anshusaurav Date: Wed, 25 Mar 2020 12:01:36 +0530 Subject: [PATCH 2/5] 'Check' --- 01 - JavaScript Drum Kit/index-START.html | 47 +++++++++-------------- 02 - JS and CSS Clock/index-START.html | 32 ++++++++++++++- 2 files changed, 48 insertions(+), 31 deletions(-) diff --git a/01 - JavaScript Drum Kit/index-START.html b/01 - JavaScript Drum Kit/index-START.html index 779814dc8c..047d4e2895 100644 --- a/01 - JavaScript Drum Kit/index-START.html +++ b/01 - JavaScript Drum Kit/index-START.html @@ -58,37 +58,26 @@ diff --git a/02 - JS and CSS Clock/index-START.html b/02 - JS and CSS Clock/index-START.html index 12f721b183..f73b1b7aae 100644 --- a/02 - JS and CSS Clock/index-START.html +++ b/02 - JS and CSS Clock/index-START.html @@ -56,19 +56,47 @@ transform: translateY(-3px); /* account for the height of the clock hands */ } + .hand { width: 50%; height: 6px; 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.59, 1); + } + .min-hand { + height: 9px; + } + .hour-hand { + height: 12px; } - From dded3eda65c1cba012ac58b81d6a4c124ae275e5 Mon Sep 17 00:00:00 2001 From: anshusaurav Date: Wed, 25 Mar 2020 14:02:24 +0530 Subject: [PATCH 3/5] 'Check' --- .../index-START.html | 15 +++++++++++++++ 1 file changed, 15 insertions(+) diff --git a/10 - Hold Shift and Check Checkboxes/index-START.html b/10 - Hold Shift and Check Checkboxes/index-START.html index 4fd2936ddc..22d0e67cfb 100644 --- a/10 - Hold Shift and Check Checkboxes/index-START.html +++ b/10 - Hold Shift and Check Checkboxes/index-START.html @@ -96,6 +96,21 @@ From f1c6e7007fa6cc5d622701b5c2489da4934f8830 Mon Sep 17 00:00:00 2001 From: anshusaurav Date: Wed, 25 Mar 2020 14:48:14 +0530 Subject: [PATCH 4/5] 'Check' --- 15 - LocalStorage/index-START.html | 28 +++++++++++++++++++++++++++- 1 file changed, 27 insertions(+), 1 deletion(-) diff --git a/15 - LocalStorage/index-START.html b/15 - LocalStorage/index-START.html index d444f1d68b..5142227f4b 100644 --- a/15 - LocalStorage/index-START.html +++ b/15 - LocalStorage/index-START.html @@ -29,7 +29,33 @@

LOCAL TAPAS

const addItems = document.querySelector('.add-items'); const itemsList = document.querySelector('.plates'); const items = []; - + const button = document.querySelector('input[type="submit"]'); + const inpElem = document.querySelector('input[type="text"]'); + button.addEventListener('submit', addItem); + function addItem(event){ + event.preventDefault(); + let str = inpElem.value; + if(str.trim().length > 0) + items.push(str.trim()); + updateUI(); + inpElem.value = ''; + + } + function updateUI(){ + itemsList.innerHTML = ''; + for(let i = 0;i < items.length; i++){ + let liEl = document.createElement('li'); + let inpCheck = document.createElement('input'); + inpCheck.type = 'checkbox'; + inpCheck.setAttribute('data-index',i); + inpCheck.setAttribute('id', 'item'+i); + let label = document.createElement('label'); + label.setAttribute('for','item'+i ); + label.textContent = items[i]; + liEl.append(inpCheck,label); + itemsList.append(liEl); + } + } From ad51aef4935b523a14cc8e2f0eb8231babad8148 Mon Sep 17 00:00:00 2001 From: anshusaurav Date: Wed, 25 Mar 2020 15:47:28 +0530 Subject: [PATCH 5/5] 'Check' --- 15 - LocalStorage/index-START.html | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/15 - LocalStorage/index-START.html b/15 - LocalStorage/index-START.html index 5142227f4b..a1894984de 100644 --- a/15 - LocalStorage/index-START.html +++ b/15 - LocalStorage/index-START.html @@ -28,15 +28,16 @@

LOCAL TAPAS