mirror of
https://github.com/LCPQ/QUESTDB_website.git
synced 2024-08-26 14:11:51 +02:00
15 lines
372 B
JavaScript
15 lines
372 B
JavaScript
function selectSelectAll_click(e) {
|
|
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 () {
|
|
$(this).prop('selected', true);
|
|
});
|
|
if (old!==target.val()) {
|
|
target.trigger("change")
|
|
}
|
|
}
|
|
} |