Skip to content

Commit

Permalink
Deploying to gh-pages from @ 883dae0 🚀
Browse files Browse the repository at this point in the history
  • Loading branch information
ChrisMBarr committed Jul 27, 2023
1 parent 018509c commit ec5f606
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions utils.js
Original file line number Diff line number Diff line change
Expand Up @@ -7,10 +7,11 @@ function $$(multiElSelector) {
function toggleDisplay($elements) {
function t(el) {
const currentDisplay = getComputedStyle(el).display;
if (currentDisplay === 'block') {
if (currentDisplay !== 'none') {
el.attributes['data-prev-display'] = currentDisplay;
el.style.display = 'none';
} else if (currentDisplay === 'none') {
el.style.display = 'block';
el.style.display = el.attributes['data-prev-display'] ?? 'block';
}
}

Expand Down

0 comments on commit ec5f606

Please sign in to comment.