On-Scroll header Menu Works in preview mode, but not in published site after upgrade

Hello everyone, hope you all doing good.

Here is my problem, i´ve created an on-scroll header using this code:

export function header1_OnViewportLeave(event) {
$w(‘#HeaderFlotante’).show();
}

export function header1_OnViewportEnter(event) {
$w(‘#HeaderFlotante’).hide();
}

For a long time it worked just fine, but after i did an upgrade it suddentley stopped working, right now it keeps working in preview mode, but in published site, simple not, i don´t know why.
Any help will be very apreciate

This is the site: https://www.jhenao.com/

I am experiencing the same issue with my site. It was working when I published the site back in Feb but suddenly it has stopped working completely.

This is the code that I had been using

$w.onReady( function () {

export function header1_viewportLeave(event) {
let $show = $w.at(event.context)
$show(‘#purpleHeader’).show()
}

export function header1_viewportEnter(event) {
let $hide = $w.at(event.context)
$hide(‘#purpleHeader’).hide()
}
});

i noticed it still working in Internet explorer, how can we make this work in chrome?

great, works with the new code

Just used that code to fix mine too! THX!!

One thing that has always bugged me was that I wish there was a way to fade in the header. Currently it just blinks in each time…

do you know why my strip wont automatically show the attach to header? It won’t show unless I only choose the menu or logo, but when i drag the strip, it doesn’t and I don’t know how to attach it otherwise.

https://www.wix.com/corvid/forum/community-discussion/fixed-frozen-header-example