10
0
mirror of https://github.com/LCPQ/QUESTDB_website.git synced 2024-11-03 20:53:59 +01:00
QUESTDB_website/js/numberRangeChange.js
2020-11-24 18:21:58 +00:00

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)
}