Use Button to Hide Element & Navigate to Page

Wixers, I have a hidden box that I’m trying to format like a fancy drop down navigation menu. The box has pictures, text, and some links. The element is view-able on all pages, but hidden on load. The element appears when another element in the page header is clicked. Using the onready and hide commands, I can get the element to hide when using the links embedded in the element to navigate to another page.

However, when the link connects to the current page, I can’t figure out how to get the box to hide.

Any ideas? My current code is below.

For reference, I don’t want to use the limited functionality of a lightbox.


// Used to hide overly complicated menus
$w.onReady(function () {
$w(“#MenuCOMP”).hide();
})

// Used to show or hide custom menu boxes
export function HeaderCOMPANY_click(event, $w) {
if( $w(“#MenuCOMP”).hidden ) {
$w(“#MenuCOMP”).show();
}
else {
}}

1 Like