10
0
mirror of https://github.com/LCPQ/QUESTDB_website.git synced 2024-12-25 13:53:48 +01:00
QUESTDB_website/static/js/selectSelectAll.js

15 lines
372 B
JavaScript
Raw Normal View History

function selectSelectAll_click(e) {
2020-01-28 10:53:37 +01:00
const ctrl = $(e.target).next()
selectSelectAll(ctrl)
}
function selectSelectAll(target) {
if (target.prop('type') == 'select-multiple') {
const old=target.val()
target.find("option").each(function () {
2020-01-29 17:36:50 +01:00
$(this).prop('selected', true);
2020-01-28 10:53:37 +01:00
});
if (old!==target.val()) {
target.trigger("change")
}
}
}