Thanks a lot, @sridharan.s! I tried my own version (it works for me), that looks not very different from yours. I’ll place it here so that other people can try both versions. Basically my approach does the following: attaches the footer (id #footer) -in the very bottom of the page by default- to the end of an element I’m using as an “anchor” or reference where I want to have the footer (id #reference), and then it cuts the length of the page (id #full_page) just after my big group that occupies almost the whole page (id #categories), minus 80px (this is what works for me). Please note that I use the “anchor” or reference because otherwise my footer goes to the end of the page, after the huge empty space, so I need to “bring it to the top” before I cut the page’s length.
To do this, I split the whole thing in 2 steps (both of them inside a “Do when Page loaded (entire)”). First step:
$( document ).ready(function() {
var full_page= document.getElementById("full_page");
var categories = document.getElementById("categories");
var footer = document.getElementById("footer");
var reference = document.getElementById("reference");
function insertAfter(el, referenceNode) {
referenceNode.parentNode.insertBefore(el, referenceNode.nextSibling);
}
insertAfter(footer, reference);
});
Second step:
$( document ).ready(function() {
setTimeout(function(){
var full_page= document.getElementById("full_page");
var categories = document.getElementById("categories");
var footer = document.getElementById("footer");
var reference = document.getElementById("reference");
full_page.style.height = (parseInt(categories.style.height) - 80) + "px";
}, 1000);
});
Then, you can re-use the second step only every time you hide or show a new element, so that the whole page gets resized every time (you only cut the page, that’s why you don’t have to run the first step, related only to move the footer just below the last element of the page). Note that I’ve had to add a delay (setTimeout) of 1 second, because otherwise the JS code runs before my elements are displayed (if you set a delay, you wait until all the elements are displayed after every action, and only then you run the JS code inside the function).
Hope using either @sridharan.s’ code or my code other bubblers can solve this issue with dynamic lengths. In any case, I really think this is just a hack, and that Bubble should improve this feature At least, for now, it works for me. Thanks guys for all the support! You’re the best!