Skip to content

Commit 77a3ac9

Browse files
author
=
committed
listen to changes
1 parent 13f389b commit 77a3ac9

File tree

1 file changed

+9
-0
lines changed

1 file changed

+9
-0
lines changed

03 - CSS Variables/index-START.html

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -62,6 +62,15 @@ <h2>Update CSS Variables with <span class='hl'>JS</span></h2>
6262
</style>
6363

6464
<script>
65+
const inputs = document.querySelectorAll('.controls input');
66+
67+
function handleUpdate(){
68+
console.log(this.value);
69+
}
70+
71+
inputs.forEach((input) => {
72+
input.addEventListener('change', handleUpdate);
73+
})
6574
</script>
6675

6776
</body>

0 commit comments

Comments
 (0)