So here is my problem
- I have a database of images and corresponding information
- The DB is connected to a pro gallery and when you click on any given image it takes you to a dynamic page i’ve created
- The dynamic page has no header/footer (I have changes the layout in page settings). I would like to have a back button that works to bring me back to the page and location the transition was originated from. Thus far I have tried the following code:
import wixWindow from 'wix-window';
import {session} from 'wix-storage';
import wixLocation from 'wix-location';
let previousPageURL;
$w.onReady(function () {
previousPageURL = session.getItem("page");
console.log(previousPageURL);
session.setItem("page", wixLocation.url);
$w("#btnBack").link = previousPageURL;
$w("#btnBack").target = "_self";
});
but its not working so well and it is glitchy on mobile for some reason… So then I tried to implement the lightbox as menu method. It works ok on desktop but on mobile I wanted to turn on the mobile menu instead of the lightbox. However this is where I ran into the problem - since I changed the layout to no header/footer I don’t have the option to get the menu button in mobile… so I want to try and hide header/footer on desktop and have a lightbox and on mobile to have the hamburger…
Additionally I made an animated hamburger button for the desktop/lightbox slide-out, however when I set the onMouseIn/Out settings to trigger the hide/show of the button, it glitches and on MouseOut it does not display the animation, but since the lightbox has a close button i thought that I could link it so that the reverse hamburger animation is triggered when the slideout menu is closed, but I can’t figure out how to have the lightbox event trigger an event on a different page… so any advice on that issue would be greatly appreciated…
Thanks in advance…