10
0
mirror of https://github.com/LCPQ/QUESTDB_website.git synced 2024-12-26 22:33:56 +01:00
QUESTDB_website/static/js/numberRangeChange.js

12 lines
370 B
JavaScript
Raw Normal View History

2020-04-08 11:34:52 +02:00
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)
}