Site Menu

I’ve coded a simple menu for my site. Currently if a user hovers over a button that reads “about”, a ‘menu’ box with subpage links will appear and it disappears when their mouse moves off of the menu box. I cannot figure out how to make the box disappear when a user navigates to a new page. Typical menus disappear once a user clicks on a link and I would like it to do that. Just hide on page load. Please help!

did you try it ?

$w.onReady(function () {
$w(“#horizontalMenu2”).collapse();

});

Hi Gabriel. Is there supposed to be a function in between the ()? Because that did not work, it just hid the menu from being seen when the buttons were hovered over. Here is the code I currently have:

$w.onReady(function () {
//TODO: write your page related code here…

});

export function ABOUT_mouseIn(event, $w) {
//Add your code for this event here:
$w(“#submenu1”).show();
$w(“#submenu2”).hide();
}

export function AWARDS_mouseIn(event, $w) {
//Add your code for this event here:
$w(“#submenu2”).show();
$w(“#submenu1”).hide();
}

export function submenu2_mouseOut(event, $w) {
//Add your code for this event here:
$w(“#submenu2”).hide();
}

export function submenu2_mouseIn(event, $w) {
//Add your code for this event here:
$w(“#submenu2”).show();
}

export function submenu1_mouseIn(event, $w) {
//Add your code for this event here:
$w(“#submenu1”).show();
}

export function submenu1_mouseOut(event, $w) {
//Add your code for this event here:
$w(“#submenu1”).hide();
}

Did you select hidden on load for your submenu elements? You can find this on the properties window.