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("#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?:

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.

Also, have a look at Nayeli’s youtube video about it here.
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

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