đˇ **Sonia** August 20, 2019 9:28 PM (UTC-04:00) **Code is not working - Issue with a pop up lightbox**
I have add some code so the subscribers pop up only appear once per user, no matter how many sessions or pages visits.
Here is the code that I added for the tab âpageâ and the tab âsiteâ
import {local} from âwix-storageâ;
import wixWindow from âwix-windowâ;
$w.onReady(function () {
// flag is not found
if(!local.getItem(âfirstTimePopupShownâ)) {
// open popup
wixWindow.openLightbox(âSubscribeBWâ);
// set flag for future visits
local.setItem(âfirstTimePopupShownâ, âyesâ);
}
} );
Is there anything wrong with my code? A client told me that the pop up is constantly popping up in every page, even on the same session.
I need urgently some help here!
thank you, Sonia