Please help! my code doesn't work in live mode

hey guys,
I know there are many similar posts in this forum, but I can’t filter the best solution for my issue.
I put in some code in corvid mode to simulate a sticky header. It works perfectly fine in preview mode but doesn’t work in live mode.

I’ve read some stuff about datasets or that the code maybe loads faster then the elements it refers to…

but I don’t know what to change or how. Does anybody know ho to solve this?


here is my code:


let floatOptions = {
 "duration":   500,
 "delay":      0,
 "direction":  "top"
};

let fadeOptions = {
 "duration":   800,
 "delay":      0,

};

export function smallstrip_viewportEnter_1(event) {
$w("#smallstrip").hide();     
     $w("#smalllogo").hide();     
     $w("#group13").hide();        
     $w("#largestrip").show();     
     $w("#group9").show();     
     $w("#largelogo").show(); }

export function largestrip_viewportLeave_1(event) {
    $w("#smallstrip").show("fade", fadeOptions);     
    $w("#group13").show("fade", fadeOptions);     
    $w("#smalllogo").show("fade", fadeOptions);         
    $w("#largestrip").hide("float", floatOptions);     
    $w("#group9").hide("float", floatOptions);     
    $w("#largelogo").hide("float", floatOptions); }

Did you sync your sandbox database to the Live database?

hey there, thanks! sorry for asking dummy questions but when i open this database thing, the only datacollection existing is “BLOG” so… what do I have to do? Do I have to create a database for the code? and if yes, how? ord do I have to clickk this synch-button somewhere else?

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.

I hope this is the url you where asking for?:

https://editor.wix.com/html/editor/web/renderer/edit/9679e839-3149-4b41-88a4-7f089b20cf23?metaSiteId=daf07ebb-99b2-4f20-a931-9c157b9a1772&editorSessionId=b8d4c3e8-06c1-4068-ad4f-1d6f59aa6592&referralInfo=dashboard

the whole website is involved, as my issue is about the header, which is included in every page.

I sent this on to QA for evaluation. I’m not sure exactly what behavior you expect, but I see that Preview and Live behave differently.

The behavior in preview mode is showing exactly how it should, but in live preview it doesnt do anything. thank you. do you know how long it will take until I get some new infos about this issue?

I tried it in Chrome and in Live it behave similarly to Preview but not exactly the same. I expect that QA will have something to say in a day or so.

Have you seen this forum post about it as it states why the original example for it was not working anymore, as it was due to the onViewport event handlers not working.
https://www.wix.com/corvid/forum/community-discussion/fixed-frozen-header-example

Also, have a look at Nayeli’s youtube video about it here.
https://www.youtube.com/watch?v=6zS0OavqbAc
Make sure that you read her info about the video as it states that there were problems with it too and how they rectified it etc. Plus, you will also find the links there to her tutorial website where you can find all the code needed and how to fix it there too.

1 Like

thank you but this is way to complicated for me XD

Hi, I never received any information from QA.

@desiree Hi. Please notice the post below from givemeawhisky - he has described the solution needed for your case.
There is an example, where you can find how to fix the issue you have https://www.wix.com/corvid/example/Frozen-Header

Regards, Aleksander

hm, okay…
hope I will find a away to get the information I need …

@desiree In case you still have issues, please give more details about what exactly did you do and what is not working. Thanks