I used this code https://www.wix.com/corvid/example/collapse-elements Everything works well expect the size of my page who doesn't collapse. https://yfresneau.wixsite.com/musohealth/muso-team if you click on 'CHWs & Supervisor' of the Anchors menu on the left you will see the section with collapse content and the long page size after.
Does anyone have a solution for that? Many thanks in advance
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.hide(); } else { $fold.collapse(); $arrowDown.hide(); $arrowRight.show(); } // collapse the other folds [1,2,3] .filter(idx => idx !== index) .forEach(idx => { $w('#fold' + idx).collapse(); $w('#arrowDown' + idx).hide(); $w('#arrowRight' + idx).show(); }) } export function headerBox1_click(event) { toggleFold(1); } export function headerBox2_click(event) { toggleFold(2); } export function headerBox3_click(event) { toggleFold(3); }
Hi Yeelen!
The page won't collapse because the footer isn't under the collapse element. Your collapse element looks fine to me.