Help with a mobile lightbox

Hey guys, I really appreciate any help you can give me with a mobile lightbox issue. So I’ve got everything working exactly as we need on desktop, on mobile we have a slight issue. The wix site in question is www.valalending.com .
If you view the website on desktop you’ll see you get lightbox containing a disclaimer. On mobile you text of the disclaimer never actually appears? the overlay (black opaque) appears but the disclaimer text an button actually never seems to appear? It’s like the lightbox contents never loads but the overlay does?
Any help would be greatly appreciated, this has been bugging me for hours now lol.

1 Like

Okay so you have made your ligthbox for the desktop editor look all good and fine, however have you made the lightbox in your mobile editor look all good and fine too?
https://support.wix.com/en/article/editing-your-lightbox-in-the-mobile-editor

I doubt that you will have any code on that lightbox too, so if you still get the issue, then you are better suited going through Wix Support themselves and not through this forum as it is for code related issues.
https://support.wix.com/en/about-wix/contacting-wix-support

You probably just have to click on the crossed out eye in the mobile editor that lists all hidden elements. Look for your lightbox container, and set it to show on mobile.

Thanks for your reply. I do have some code on the lightbox to make sure it only appears until they click the “accept” button. Here’s the code:

import { local } from 'wix-storage';
import wixWindow from 'wix-window';

export function Accept_click(event, $w) {
 // set flag for future visits
    local.setItem("firstTimePopupShown", "yes");    
    wixWindow.lightbox.close();
}

$w.onReady(function () {
 //TODO: write your page related code here...
 if (!local.getItem("firstTimePopupShown")) {
        wixWindow.openLightbox("Welcome");
    } else {
        wixWindow.lightbox.close();
    }
});

Hey David, thanks for your help however I’ve done this already. It’s really odd. Also I don’t know if this is going to make any difference but it looks like the disclaimer text is under the overlay, but only in the mobile editor?! See attached screen shot.

@barry It sounds like your elements are still set to hidden on load in the properties panel, so go ahead and open that and make sure that the box isn’t ticked for the text and for the button in the mobile editor.

Also, it looks like your lightbox still has the triggers set through the GUI, you should remove all the lightbox triggers so your code can actually discriminate when to show the pop-up.

I would also suggest that you go back to the actual tutorial itself and read it thoroughly as you are mixing up two codes.
https://support.wix.com/en/article/corvid-tutorial-creating-a-one-time-popup

Plus as David says, if you use close lightbox thtough code then you need to get rid of the close button and the x close button and the close if you click on the overlay option.

As it says if you look in the Wix API reference for lightbox close.