I have a logo on the top of the header, and under it - a strip with a menu.
I would like the logo to collapse when scrolling, so only the narrow strip would remain.
When I go back to the top of the page - the logo supposed to expand again.
I’ve put under the menu, on the page itself, a transparent button, “show on all pages”.
I’ve used this code to make it a trigger for the collapse /expand of the logo :
export function collapsebutton_viewportEnter() {
$w(“#image5”).expand();
}
export function collapsebutton_viewportLeave() {
$w(“#image5”).collapse();
}
(The logo is “#image5”)
I’ve put the code in the “site” section - so it will work for the whole site.
Apparently, it works only on some pages, and on some - not.
What did I do wrong?
How can I check it?
This is the site:
www.tamirashman.co.il