Get rid of final piece of inline JS

This commit is contained in:
daudix
2024-10-18 20:49:52 +03:00
parent 732217ccea
commit a05bb5c8f1
2 changed files with 10 additions and 10 deletions

View File

@ -1,3 +1,13 @@
// Slider
var slider = document.getElementById("range");
var output = document.getElementById("range-value");
output.innerHTML = slider.value;
slider.oninput = function() {
output.innerHTML = this.value;
}
// Spaceship control center
const colorPickerLight = document.querySelector("#color-picker-light"); const colorPickerLight = document.querySelector("#color-picker-light");
const colorPickerDark = document.querySelector("#color-picker-dark"); const colorPickerDark = document.querySelector("#color-picker-dark");
const contrastCheckboxLight = document.querySelector("#contrast-color-light"); const contrastCheckboxLight = document.querySelector("#contrast-color-light");

View File

@ -483,16 +483,6 @@ With `range` type:
<input type="range" max="100" value="33" id="range"> <input type="range" max="100" value="33" id="range">
<!-- For the demo purposes only --> <!-- For the demo purposes only -->
<small id="range-value"></small> <small id="range-value"></small>
<script type="text/javascript">
var slider = document.getElementById("range");
var output = document.getElementById("range-value");
output.innerHTML = slider.value;
slider.oninput = function() {
output.innerHTML = this.value;
}
</script>
<!-- End --> <!-- End -->
### Figure Captions (`<figcaption>`) ### Figure Captions (`<figcaption>`)