For my site I need two different menus to load in different pages. As you don´t have an option to create more than 1 menu, I had to make the menu 2 with buttons, and in order to show menu 1 in some pages and menu 2 in the rest of them, I had to hide menu 1 in some pages and menu 2 in the rest of them. The problem is that, when I first open the site and choose to go to the page with one of those menus, and then change to a page with the other menu, that second menu doesn´t load. It stays blank, and I have to press F5 to reaload the page. Every time, doesn´t matter if I´m loading the real menu or the buttons. I tried it in several computers and the problem remains.
Could you paste your code here Eugenia?
Sure, as I don´t know anything about coding I used this very simple tutorial to hide elementes:
so my coding in one of the pages for example is this one:
$w.onReady( function () {
// Hides the element when the page loads
$w(“#button8, #button9, #button10, #button11, #button12, #button13, #hoverBox11”).hide();
});
This is the case where I have the original menu, and I hide the second menu made out of buttons.
@eugeniagarat Are these buttons placed on the header/footer or marked as “shown on all pages”?
P.S. because if they are, you have to add show() on the page you want them to be shown:
$w.onReady(function () {
$w("#button8, #button9, #button10, #button11, #button12, #button13, #hoverBox11").show();
});
@jonatandor35 they are in the header, do I still need to add show? I thought they were shown by default unless I specify to hid it in that page. They do show but after reloading the page
@eugeniagarat I’m not sure what exactly the situation there. But it sounds that your elements are global (i.e. shared on different pages).
In this case you should add the show().
If you have many pages and you don’t want to put this code in each of them, you can put the code in the “Site” section, and define there on which page it should be hidden and on which page it should be displayed.
@jonatandor35 I was deffinetly missing the “show” part. Solved! Thanks a lot!