I have a HTML range control, that using javascript passes values back to a HTML Class.
Please see the below code:
HTML
<div class="userbox">
<h3> Number of Users: <span class="usercount4">5</span><h3>
<input type=range min=5 max=50 value="5" step=1 id=usercount4></input>
</div>
<div class="serverbox">
<h3> Number of Channels: <span class="servercount4"> 1</span><h3>
<input type=range min=5 max=150 value="5" step=5 id=servercount4></input>
</div>
<div class="totalbox">
<h3>Total: <h3>
<span class="total4">£30</span><p style="display: inline"> / month</p>
</div>
JAVASCRIPT
$(document).ready(function() {
var total4;
var count4 = $('#usercount4').val();
var addToTotal4 = function(){
total4 += parseFloat(this.value, 10);
};
var compute4 = function() {
total4 = 0;
$('.option4:checked ,#servercount4 ,#usercount4').each(addToTotal4);
$('.total4').text('£' + (total4 + ($('#usercount4').val()*5)-($('#usercount4').val())).toFixed(0));
};
$('.option4, #servercount4 , #usercount4').change(compute4);
$('#usercount4').on('input', function(){
$('.usercount4').text($('#usercount4').val());
});
$('#servercount4').on('input', function(){
$('.servercount4').text($('#servercount4').val()/5);
});
$('#usercount4').on('input', function(){
$('.total4').text('£' + (parseFloat($('#servercount4').val())+parseFloat(($('#usercount4').val()*5))));
});
$('#servercount4').on('input', function(){
$('.total4').text('£' + (parseFloat($('#servercount4').val())+parseFloat(($('#usercount4').val()*5))));
});
});
The code works fine on Edge, Safari and Firefox. But on IE the total4 field updates but the usercount4 and servercount4 fields do not.
A working demo can be seen here (the code is from the last set of range controls on the page)
www.yellowsand.co.uk/#telephony
Any help greatly appreciated.