Background color change


I found this code in:
I really want to add that to my pages!
But I don’t know how to add that to a specific page?
Can you help me with that please?

$w.onReady(() => { }); export function linese1_viewportEnter_1(event) { $w(“#bgColor”).style.backgroundColor = “#D4E0DE”; } export function linese3_viewportEnter(event) { $w(“#bgColor”).style.backgroundColor = “#DBE6DC”; } export function linese4_viewportEnter(event) { $w(“#bgColor”).style.backgroundColor = “#F2E2E1”; } export function linese5_viewportEnter(event) { $w(“#bgColor”).style.backgroundColor = “#F5F3EB”; } export function lineseb_viewportEnter(event) { $w(“#bgColor”).style.backgroundColor = “#F7F7F7”; } export function linese2_viewportEnter(event) { $w(“#bgColor”).style.backgroundColor = “#DBDBD9”; }

Thank you!

Are you using EditorX? If you are just simply select the Page in the layers at left, and then update the color in the inspector panel at right.

Yes, I am using editor X.
Thank you for your help but you are talking about a normal colorful background.
I am talking about the code in the link below:
It’s a custom code for changing the background color while the visitor scroll down the page.
I don’t know how to add the code to my page?

That code seems to be Javascript code. In which case, you would need to enable Dev Mode and add it to the Code Panel .

Note you’ll probably need to add work further as just entering it didn’t work on the site.

Thank you for your reply!
Yes, that’s my problem.
I did add the code before, but it didn’t work.
I don’t know how to fix that and how to make it work?
Can you help?

And it should be in the Velo language.