Hidden on load, but still showing?

I have elements that I have set as hidden on load, but are still showing on site…

I also have a button with code that should show the item when clicked and go to another page, it also isn’t doing that.

Is this a me issue and I am doing something wrong or is this a general issue?

Hey Hello,

can you send a link to your published site, and specify exactly where the problems are?

It’s not exactly a site yet, forgive the mess (I’m switching from the normal editor to Editor X) . But it’s https://everyoul.editorx.io/mysite-10-1 .

The blue strip is a header and it shows two different menus, but on the backend I have them set to hidden.

The two buttons next to the menu at the very top (Studio & Gearup) should show or hid the different menus when clicked.

Hey,
I see the issue, Anyway In your particular use case you can use “collapsed on load” instead, and it should work fine and achieve the result that you want. Im attaching a screen shot and the code

// The code in this file will load on every page of your site

$w.onReady(function () {
 // Write your code here
});

export function button5_click(event) {
    $w("#button5").link = "/studio";
    $w("#gearupMenu").collapse();
    $w("#studioMenu").expand(); 
}

export function button6_click(event) {
    $w("#button6").link = "/home";
    $w("#gearupMenu").expand();
    $w("#studioMenu").collapse();  
}

Another way is to use the corvid timeline API, if you want the menus to animate in and out.

@idoh Thank you so much! I don’t know why I didn’t try that in the beginning.

One more thing to go with that… Any chance you know if there is a way to show an element based of the previous page they were on?

Page A and B have a different menus, C has no menu. If a person goes from page A to C is there a way to show the menu from A …or if a person goes from page B to page C the menu from B would be shown.

If that makes sense…

I have the same issue as well in my website !

if you open the page in new tab, it should work fine, but if you open it in the same tab, then all hidden/collapsed elemants are shown!!!