Hi,
I have a little code under the “site" section of my site, www.letsstartdesign.com. that controls the menu and hamburger menu. The menu is supposed to glide away on viewport leave.
It was working just fine but I noticed today that it doesn’t seem to be working now on the live site. If I preview the site it works. Any ideas?
Heres the code under the site section:
let glideOptions = {
"duration": 1000,
"delay": 0,
"angle": 90,
"distance": 250,
};
$w.onReady(function () {
});
export function vectorImage3_click(event, $w) {
$w('#horizontalMenu1').show ("glide",glideOptions);
}
//vectorimage3 is the hamburger menu
export function horizontalMenu1_viewportLeave_1(event) { $w('#horizontalMenu1').hide ("glide",glideOptions); }
//horizontalMenu1 is the site menu that is supposed to glide in and out.
Lorraine
I think your problem is that you are trying to hide horizontalMenu1 when it leaves its own viewPort. It wouldn't make sense this way. It will be like matching a logic to itself like
if(sigma === sigma)
You should call the horizontalMenu1 to hide on some other element's viewport Leave such as an anchor