round display of range inputs to 2 decimals

This commit is contained in:
Alexander Graf
2021-11-02 12:59:59 +01:00
parent edc00a4af3
commit e8b5f1a185

View File

@@ -43,7 +43,7 @@ $('document').ready(function() {
var infinity = $(this).data('infinity');
var step = $(this).attr('step');
$(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');
}
});