top of page

Hide Sections on Specific Dynamic Pages

Updated: Dec 30, 2024



Velo Code:


$w.onReady(function () {
    
    $w("#dynamicDataset").onReady(() => {
        let project = $w("#dynamicDataset").getCurrentItem();

        if(project.one===true){
            $w("#one").show();
            $w("#one").expand();
        } else {
            $w("#one").hide();
            $w("#one").collapse();
        }

        if(project.two===true){
            $w("#two").show();
            $w("#two").expand();
        } else {
            $w("#two").hide();
            $w("#two").collapse();
        }

        if(project.three===true){
            $w("#three").show();
            $w("#three").expand();
        } else {
            $w("#three").hide();
            $w("#three").collapse();
        }
    });
});

Enjoy!

Scene 02 (0-00-00-26).jpg

elevate your client projects?

Transform Your Projects with the Ultimate 2024-2025 Wix Studio Template Bundle!

Group 8.png
bottom of page