10
0
mirror of https://github.com/LCPQ/QUESTDB_website.git synced 2024-11-09 07:33:52 +01:00
QUESTDB_website/static/js/numberRangeChange.js

12 lines
370 B
JavaScript

function numberRangeChange(e) {
updateNumberRange(e.target)
}
function updateNumberRange(target) {
var parent=target.parentElement
var numbers=$(parent).children('input[type="number"].range')
var min=$(numbers).filter(".min")[0]
var max=$(numbers).filter(".max")[0]
min.max=Number(max.value)-Number(min.step)
max.min=Number(min.value)+Number(max.step)
}