Cannot use Wix Code

When I try to use Wix code, it does not do anything.

For example, if I type:

$w(‘#header1’).hide();

It says, “Error: #header1 has not method hide()”

I also cannot use style (e.g. $w(‘#header1’).style.backgroundColor = ‘#fff’;).

How can I get the code to work?

The Header properties (e.g. style) cannot be changed via code, and it does not have hide() and show() functions. See the Header API for more details.

For more information on how to use Wix Code, see the documentation .

Hi Yisrael,

Thank you for your reply. That makes sense.
Does this mean there is no way to hide the header but keep the footer on one page?

Also, is there a way to give a border radius to text inputs in forms?
I have a contact form on my page, but the normal Wix editor does not allow me to change the border radius.

When I try to use $w(‘FormElement’) or $w(‘TextInput’) they both give an array of 0 length… How can I access these inputs to give them a border radius?

Thanks again for your help.

No way to hide the header or manipulate it in code. See Tal’s comment below about how to hide by configuring the page layout.

You can style input (and other) components by using the component’s style panel in the Editor.

Click on the Style button:

Click on Customize Design :

And then go to town styling the component as you want:

Have fun!

Hi :slight_smile:
I just wanted to add that you can change the page layout to hide the header. However, you cannot do it using code. Note that it hides the footer as well. Check out the article here .

Best,
Tal.

@yisrael-wix Thanks again for your help. When I follow your steps about the inputs, there is no Corners option. How can I make it appear?

Thank you.

Thank you! I saw this article but have been looking for away to remove ONLY the header and leave the footer, as I want my home page to have a header that is a different background than the rest of the pages but it doesn’t seem possible.

Thanks again for trying to help me!