Brizy Global Footer Position Fix

This Fix is a temporary fix for the "Global Footer jumps to top" right below the Header bug/issue. To have that bug temporarily fixed until the Brizy Team fixes it properly on their side, you may embed the code snippet in your Brizy Cloud Website under "Code Injection > Footer" or "Code Injection > Header ". This Code Snippet adjusts the Footer position to be at the bottom, if you use 1 default Footer and actually want to have it positioned at the bottom.

by SamoSolutions

HTML

<!-- FIX for Brz Footer Issue-->
<script>
    var getBrzFooter = document.querySelector("footer.brz-footer");
    var getBrzFooters = document.querySelectorAll("footer.brz-footer");
    var getBrzSections = document.querySelectorAll("section.brz-section");
    var getBrzLastSection = getBrzSections[getBrzSections.length - 1];

    // Fn to reorder the Footer to the Bottom (FIX for Brz)
    function fixBrzFooterBugTemp() {
        // Declare a fragment:
        var fragment = document.createDocumentFragment();

        // Append desired element to the fragment:
        fragment.appendChild(getBrzFooter);

        // Append fragment to desired element:
        getBrzLastSection.appendChild(fragment);
    }

    // Run FIX if 1 default Footer was found & LOG ?/?
    if ((getBrzFooters.length = 1)) {
        console.log("✔ only 1 Footer ?");
        fixBrzFooterBugTemp();
    } else if (getBrzFooters.length > 1) {
        console.log("More than 1 Footer ?");
    } else if (getBrzFooters.length < 1) {
        console.log("No Footer found ?");
    }
</script>