Parsing error: Unexpected Token {

Hi! Sorry in advance if this is a really easy fix, I’m completely new to coding.

I noticed on my website I’m getting this message ’ Error parsing web-module ‘public/pages/masterPage.js’: Unexpected token (12:18) while parsing file: public/pages/masterPage.js’ when I preview it on any page.

I haven’t touched the site code at all so I’m not sure why it is doing this, but here’s a copy of my code:

Any help would be greatly appreciated because I’ve got no clue.

Cheers,

  • Ben

Wix sites only support Corvid, and do not support use of straight HTML/CSS. To learn about programming with Corvid, read the following articles that will help you start working with Corvid:

background-color is something that’s only in CSS I think. And Corvid only allows Javascript.

If you want to change you background color, you can do it in the dynamic page editor without code!

Alright thankyou, I haven’t touched the code at all so I’m not sure why it’s there, will it be fine just to delete it?

If you want to change you background color, you can do it in the dynamic page editor without code!
You can also use CODE to change BackgroundColor, but it depends on which element you are using. Not all elements are similar in this case.

https://www.wix.com/corvid/reference/$w/box/style

Baroku, what you are trying to do?

What element do you wanna to change his bg-color?
You are trying to do a “hover-effect”, right?

If you do not need this function at all, then just delete both functions.