hi, i've tried existing codes on this forum to no avail, so i wanted to vent my specific struggle.
i want to hide the below elements (#image1 and #horizontalMenu1) on the page "HOME" only. everywhere else, i want them shown. i've tried using the page-exclusive code that's meant to hide them for said page, but it continues to hide them everywhere else.
can someone advise me please? what's the most concise way of doing this? i imagine it's something like if page is HOME, hide #image1 and #horizontalMenu1, if else, show #image1 and #horizontalMenu1. but i just don't know how to write it.. or make it work.
any help would be really appreciated. thanks so much!
If it's a global element (i.e. element that exists on all pages such as header, footer etc..) then once you hide it, it'll remain hidden until you show it again even if you move from page to page (unless you refresh the page).
So in you case you should add to the global SITE code (the masterPage.js):
// masterPage.js $w.onReady(() => { $w("#image1").show(); $w("#horizontalMenu1").show(); })
And on the home page code:
// homepage code $w.onReady(() => { $w("#image1").hide(); $w("#horizontalMenu1").hide(); })