mirror of
https://github.com/LCPQ/QUESTDB_website.git
synced 2024-12-25 13:53:48 +01:00
Add more jQuery
This commit is contained in:
parent
31c534b9f5
commit
b205e180f8
@ -1,14 +1,14 @@
|
|||||||
function nestedCheckbox_change(e) {
|
function nestedCheckbox_change(e) {
|
||||||
checkbox = e.target;
|
checkbox = $(e.target);
|
||||||
//Apply children
|
//Apply children
|
||||||
if (!checkbox.indeterminate) {
|
if (!checkbox.is(":indeterminate")) {
|
||||||
var ul = $(checkbox).parent("li").next("ul")
|
var ul = checkbox.parent("li").next("ul")
|
||||||
if (ul.length != 0) {
|
if (ul.length != 0) {
|
||||||
ul.children("li").children("input[type=checkbox]").prop("checked", checkbox.checked);
|
ul.children("li").children("input[type=checkbox]").prop("checked", checkbox.is(":checked"));
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
//Apply parent
|
//Apply parent
|
||||||
var ul=$(checkbox).parent("li").parent("ul")
|
var ul=checkbox.parent("li").parent("ul")
|
||||||
var checkbox=$(ul).prev("li").children("input[type=checkbox]")
|
var checkbox=$(ul).prev("li").children("input[type=checkbox]")
|
||||||
checkboxes=ul.children("li").children("input[type=checkbox]")
|
checkboxes=ul.children("li").children("input[type=checkbox]")
|
||||||
var checkeds=Array.from(checkboxes).map(el=>el.checked)
|
var checkeds=Array.from(checkboxes).map(el=>el.checked)
|
||||||
|
Loading…
Reference in New Issue
Block a user