Code is simple. It’s just that if I set the footer to not visible it’s not showing up at all and when it’s visible after the clearTimeout it reappears…
If you unchecked the element’s This element is visible on page load checkbox, then Bubble won’t, indeed, load the element at all to save CPU/RAM resources (which is a very good thing). So from my understanding, your timeout script fires before the element is created.
The quickest solution you could try is to check the box that makes it visible on load and add a condition to hide it immediately…
You must keep in mind that Bubble uses the attribute to show/hide element. If you want to hide an element made visible by Bubble, must have a class that says display:none. But if you want to force the showing of an element Bubble hid, you need to override that “display:none” in the style attribute either with a class that says “display: block !important” or by literally removing the “display:none” in the attribute with javascript.
In all cases, when you manually change the visibility of elements, Bubble doesn’t know since the registered state of elements is saved elsewhere in some JS variable.
a good solution could be to use a “Javascript to Bubble” element from Toolbox plugin. So you configure it with a function name like “bubble_fn_showFooter” that publishes data of type “yes/no” and you make your footer’s visibility to depend on that JS to Bubble “yes/no”. Then with javascript, simply call bubble_fn_showFooter(true) / bubble_fn_showFooter(false) to show hide it
I decided to change the style of this footer animation and really I don’t understand. It’s working when I go full html without Bubble but on Bubble something is goes wrong…
That’s the code I want for the footer and that I use now for the header which works on bubble :