Hide logo in homepage problem

Hello

I’ve found a tutorial by Wix on how to hide a logo on the home page, but to show it inside other pages, using code. I followed the instructions and it worked, but not so good.

When the browser loads the page, it hides the logo in the other pages too. But once I refresh the page, it suddenly appears.

Did I do something wrong with the code?
This is the code I have in the homepage.

// For full API documentation, including code examples, visit https://wix.to/94BuAAs

$w.onReady(function () {
 // Hides the element when the page loads
$w("#smallLogo").hide();

});

You can see the logo at the top left of the header.
This is a link to the site

Thanks
Tal

I don’t see the problem - seems to work okay.

Hi Yisrael

As you can see, in preview mode I can see the logo inside internal pages on the top left, but in the live site, it does not appear.

Only once I refresh the page I can see the logo.

Thanks

Can anyone help me please?

Since the logo is in the header which is a global element once you hide it, it’ll stay hidden until you explicitly show it again.
So go to the SITE code panel (not the page code panel) and add there:

$w.onReady(() => {$w("#smallLogo").show();})

@jonatandor35 Thanks!
It worked! but I didn’t paste it in the site panel, but in every page I wanted it to appear.

@tal18574 That’s fine too.