-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
updated delayed job recurring to launch automatically from an initial…
…izer
- Loading branch information
Andrew Albrecht
committed
Dec 14, 2021
1 parent
a3b278e
commit f9e033c
Showing
47 changed files
with
21,658 additions
and
129 deletions.
There are no files selected for viewing
Empty file.
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,30 @@ | ||
function hookAccordion() { | ||
let acc = document.getElementsByClassName("accordion"); | ||
let i; | ||
for (i = 0; i < acc.length; i++) { | ||
let el = acc[i]; | ||
acc[i].addEventListener("click", handleAccordionToggle); | ||
} | ||
} | ||
|
||
function rehookAccordion() { | ||
let acc = document.getElementsByClassName("accordion"); | ||
let i; | ||
for (i = 0; i < acc.length; i++) { | ||
acc[i].removeEventListener("click", handleAccordionToggle); | ||
} | ||
hookAccordion(); | ||
} | ||
function handleAccordionToggle(event) { | ||
let el = event.target; | ||
let on = el.classList.contains('active'); | ||
el.classList.toggle("active"); | ||
let panel = el.nextElementSibling; | ||
if (on) { | ||
$(el).attr('aria-expanded', false); | ||
panel.style.display = 'none'; | ||
} else { | ||
$(el).attr('aria-expanded', true); | ||
panel.style.display = "block"; | ||
} | ||
} |
Oops, something went wrong.