Wix code worked for a few days on live site but suddenly stopped working properly.It still works in preview mode on the editor. Please help!

Hi, I have used wix corvid to create a transparent sticky header that turns white once you scroll past a certain point on the page. It was working perfectly in live site for a few days and suddenly now it doesn’t. Oddly, it still works correctly in preview mode in the editor, so it seems like the code is still correct but just not transferring properly to the live site anymore for some reason. I did not change anything that would have prompted this, at least not that I’m aware of. I followed a wix tutorial to create it- I do not know anything about coding, so i don’t know how to troubleshoot. Been trying to figure out how to fix this for days and cannot for the life of me figure out! Please if anyone can help it will be much appreciated!

Here is the code for reference:

// API Reference: https://www.wix.com/corvid/reference
// “Hello, World!” Example: https://www.wix.com/corvid/hello-world

$w.onReady( function () {
$w( “#headerTransitionPoint” ).onViewportLeave(() => {
$w( “#scrollingHeaderStrip” ).show();
$w( “#defaultHeaderStrip” ).hide();
})
$w( “#headerTransitionPoint” ).onViewportEnter(() => {
$w( “#defaultHeaderStrip” ).show();
$w( “#scrollingHeaderStrip” ).hide();
})
});

1 Like

Open the live site on Chrome - Right click anywhere on the screen and click on inspect - select the ‘Console’ tab and check if you get are getting errors like shown in this screenshot

Please post the editor URL of your site. Only authorized Wix personnel can get access to your site in the editor. Please include the name of the page involved.

Here is the editor URL: https://editor.wix.com/html/editor/web/renderer/edit/ccc9e276-b01c-460c-b5c3-bb3a694fe62c?metaSiteId=1c8ae469-71b6-4685-a387-0455329facac&editorSessionId=e998b266-44b5-4f4c-aca2-c798b3c2bcb6&referralInfo=dashboard

The site is “Abby Lewis Nov 2” and the page involved is the homepage.

(I will only need to use this feature on the homepage. On the other pages I am just using a strip at the top of the page to create a white background+black text static header that isn’t frozen. You can see an example of this static header version on the page “swahili fashion week 2017” under the “collections” category)

Hi Shan,
The attached is what I see when I open the console tab

Please try out your site now.

It is working on live view again!! THANK YOU SO MUCH!!

I see the below showing up in inspector on chrome still, do you know if this could cause problems going forward or it’s ok??

@abigailraelewis Well, if it’s working, you can’t argue with success.

I suspect that the messages you see are just “scary messages” and are only for the developers to know what’s going on.

@yisrael-wix sounds good! thank you so so much for getting it working again, cannot even express how much i appreciate it!