EDIT: Here’s a link to the live site, with the white void.
https://www.cvh4h.org/donating-to-the-restore
Hello!
I’ve been having an issue with a large white space at the bottom of the page, when using code to create collapsible content boxes. This has happened to two pages on the website I’ve been working on for Habitat for Humanity. I’ve read two other topics with this issue, but to no resolution.
Here’s a screenshot of the page in editor. I’ve removed all possible spaces in between elements.
Here’s the page when in preview. When all boxes are collapsed, it’s as if the elements are still taking up that much space despite the fact that they’re collapsed. This is zoomed out to 25%, that’s a lot of white space!
I’m using a code found through Corvid.
function toggleFold(index) {
let $fold = $w(‘#fold’ + index);
let $arrowdown = $w(‘#arrowdown’ + index);
let $arrowright = $w(‘#arrowright’ + index);
// toggle the fold at the index
if ($fold.collapsed) {
$fold.expand();
$arrowdown.show();
$arrowright.fold();
}
else {
$fold.collapse();
$arrowdown.fold();
$arrowright.show();
}
// collapse the other folds
[1,2,3,4,5,6,7,8,9,10,11,12,13,14,15]
.filter(idx => idx !== index)
.forEach(idx => {
$w(‘#fold’ + idx).collapse();
$w(‘#arrowdown’ + idx).fold();
$w(‘#arrowright’ + idx).show();
})
}
// appliances ap 1
export function aphead_onclick(event) {
toggleFold(1);
}
etc. etc.
Has anyone found a solution for this? Is there an error/something missing from the code that I could add?
Thank you so much!