0
Good afternoon.
I’m using the BOOTSTRAP 4
specifically an input range like this:
<div class='col slider'>
<label for="customRange3"><strong>BRIGHTNESS</strong><span class='float-right badge badge-primary lbval' id='brightnesslabel'>0</span></label>
<input type="range" class="custom-range" min="-64" max="64" step="1" id="brightness">
</div>
and I have a java script that updates the Badge
that is so :
<script>
var slider = document.getElementById("brightness");
var output = document.getElementById("brightnesslabel");
output.innerHTML = slider.value;
slider.oninput = function() {
output.innerHTML = this.value;
}
</script>
I’m caught up in turning this function javascript
in a function jquery
using .each()
because I want to copy these blocks to have several ranges and realize a .each(".slider")
Someone can help me ?
I’m trying to do it this way:
$( ".slider" ).each(function() {
$( this + ' > .lbval').html($( this + ' .custom-range').val());
});
and in case if I use the same function but instead of the input I put a change I can use it to save the data soon after changed ne?
– Jasar Orion