Skip to content

Commit

Permalink
feat: value display example
Browse files Browse the repository at this point in the history
  • Loading branch information
andreruffert committed Oct 6, 2019
1 parent bd6a83c commit f0774a4
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions examples/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -47,9 +47,13 @@
document.addEventListener('input', e => {
const input = e.target;
const output = input.nextElementSibling;
const valueDisplay = input.querySelector('.value-display');
if (output) {
output.textContent = input.value;
}
if (valueDisplay) {
valueDisplay.textContent = input.value;
}
});

</script>
Expand Down

0 comments on commit f0774a4

Please sign in to comment.