I’ve been trying to get a similar effect. I’ve managed to get the two strips fading in/out over half a second using the code below (obviously, change your naming). You can also had a delay if you want. Any of the other Wix animation types can be added in this way.
I’d really like to be able to smoothly animate the shrinking of the header, so if anyone knows how to do that it would be greatly appreciated.
//Display Secondary Header on Scroll
let fadeOptions = {
“duration”: 500,
“delay”: 0
};
export function intelliHeader01_viewportLeave(event) {
$w(‘#stripSM’).show(“fade”, fadeOptions);
$w(‘#stripLG’).hide(“fade”, fadeOptions);
}
export function intelliHeader01_viewportEnter(event) {
$w(‘#stripSM’).hide(“fade”, fadeOptions);
$w(‘#stripLG’).show(“fade”, fadeOptions);
}