Created
December 13, 2023 12:47
-
-
Save irfanbaigse/2f43b33b80d597387b554a204089e691 to your computer and use it in GitHub Desktop.
Udemy exapnd all and mark as complete
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
## Expand | |
const sectionEl = document.querySelector("section[data-purpose='sidebar']"); const checkboxes = sectionEl.querySelectorAll("input[type='checkbox']"); checkboxes.forEach((checkbox) => { if (!checkbox.checked) { checkbox.disabled = false; checkbox.click(); } }); | |
## Mark as Complete | |
const checkboxes = document.querySelectorAll("input[type='checkbox']"); | |
checkboxes.forEach((checkbox) => { | |
if(!checkbox.checked) { | |
checkbox.click();}}) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment