Problem #1 - Error on Mobile Preview “show”
I’m hiding the main menu (menu3) from the home page on all the other pages. Other pages have similar menu, but with different design elements as menu3 colors (reverse type) won’t show on other pages. Client didn’t want a navigation bar at the top on home page and wanted a full page bleed on image. Home page code (desktop editing)
$w.onReady(function() {
$w("#text72,#horizontalMenu3").show();
//Hides the element when the page loads
$w("#text73,#horizontalMenu4,#columnStrip9").hide();
let isGlobal = $w("#text72,#horizontalMenu3,#columnStrip9").global; // false
});
That seems to work okay, but when previewed in mobile I get error. On desktop editing, no error appears. Home page code (screen shots of code in mobile Edit, and also Preview modes) attached:
Mobile Edit view screen capture: (this does not show errors in “Desktop” views—only mobile):
Mobile “Preview” screen capture of error: (this does not show errors in “Desktop” views—only mobile):
Preview
Any way to fix code error for mobile? The menu for mobile seems to work fine, but I don’t like the error code and maybe there’s a better way to achieve this?
Problem #2
Multi-state boxes are used for “Awards,” “Education,” and “Recent Clients” links for additional text. They work on desktop, but mobile does not work (click text, nothing happens, no opening of “expanded states”)
How to fix for mobile? Do multi-state boxes work in mobile? If not, is there a better way to do this?
Multi-state code pic attached. Works in desktop, not mobile:
$w.onReady(function () {
// Hides homepage menu3 and shows the other menu4 element when the page loads
$w("#text72,#horizontalMenu3").hide();
$w("#text73,#horizontalMenu4").show();
$w("#text84").onClick(() => {
$w("#readMoreStatebox").changeState("expandedState");
$w("#educationStatebox").changeState("educationCollapsed");
$w("#clientsBoxcollapsed").changeState("clientsCollapsed");
});
$w("#text85").onClick(() => {
$w("#readMoreStatebox").changeState("collapsedState");
});
$w("#text87").onClick(() => {
$w("#educationStatebox").changeState("educationExpanded");
$w("#readMoreStatebox").changeState("collapsedState");
$w("#clientsBoxcollapsed").changeState("clientsCollapsed");
});
$w("#text86").onClick(() => {
$w("#educationStatebox").changeState("educationCollapsed");
});
$w("#text89").onClick(() => {
$w("#clientsBoxcollapsed").changeState("clientsExpanded");
$w("#readMoreStatebox").changeState("collapsedState");
$w("#educationStatebox").changeState("educationCollapsed");
});
$w("#text88,#text90,#text91").onClick(() => {
$w("#clientsBoxcollapsed").changeState("clientsCollapsed");
});
});
I’ve searched for answers for these questions and have found nothing similar. I hope someone can help me. Much appreciated.