add inline comments

10.3.x-maintenance
cTn 2014-01-16 00:55:45 +01:00
parent e2f10918a4
commit ac9725928d
1 changed files with 3 additions and 1 deletions

View File

@ -78,16 +78,18 @@ $(document).ready(function() {
tab_initialize_default();
// listen to all input change events and adjust the value withing limits if necessary
// listen to all input change events and adjust the value within limits if necessary
$("#content").on("change", 'input[type="number"]', function() {
var min = parseFloat($(this).prop('min'));
var max = parseFloat($(this).prop('max'));
var val = parseFloat($(this).val());
// only adjust minimal end if bound is set
if ($(this).prop('min')) {
if (val < min) $(this).val(min);
}
// only adjust maximal end if bound is set
if ($(this).prop('max')) {
if (val > max) $(this).val(max);
}