Hi, I am trying to code so that my header goes from being transparent to grey when scrolling down on the site. I watches this video Wix Code | How to Create a Frozen Header That Changes as Visitors Scroll - YouTube but I cant get it to work.
Frans Burman ,I havr read your post i suggest you to first watch that vedio ,implement it on rough tamplet and then get it on your site.
Hello my fixed header is supposed to be transparent and then turn white when a user scrolls just like in the https://www.wix.com/code/home/example/Frozen-Header example.
Here is the code I used:
export function header1_viewportLeave(event) {
$w(‘#headerMain’).show();
$w(‘#headerTwo’).hide();
}
export function header1_viewportEnter(event) {
$w(‘#headerMain’).hide();
$w(‘#headerTwo’).show();
}
It only works in Preview mode but not when the site is published. It was working earlier today, but then it just stopped. My site is aprilharrid.com Please help me to get this working again.
Hello, when I published this template https://www.wix.com/wix-code-examples/frozen-header the white header disappears, but I didn’t make any changes to the template at all. Here is what it looks like when I published it: https://adharrid.wixsite.com/mysite-1. Also, someone said that they are having the same header issue and that it only works on Window’s 10 Edge browser but not Chrome or Safari.