round display of range inputs to 2 decimals

master
Alexander Graf 3 years ago
parent edc00a4af3
commit e8b5f1a185

@ -43,7 +43,7 @@ $('document').ready(function() {
var infinity = $(this).data('infinity'); var infinity = $(this).data('infinity');
var step = $(this).attr('step'); var step = $(this).attr('step');
$(this).on('input', function() { $(this).on('input', function() {
value_element.text((infinity && this.value == 0) ? '∞' : this.value/step); value_element.text((infinity && this.value == 0) ? '∞' : (this.value/step).toFixed(2));
}).trigger('input'); }).trigger('input');
} }
}); });

Loading…
Cancel
Save