Hello!
Can anyone give me a code for how I can show a popup only the first time a user of my app opens the app?
My first screen is called: Menu
The popup is called: pop1
Hello!
Can anyone give me a code for how I can show a popup only the first time a user of my app opens the app?
My first screen is called: Menu
The popup is called: pop1
Hi Nicklass,
try to store a value inside the localstorage, if that localStorage dont have any value the popup will show and if the localstorage has a value the popup will show.
better to use if statement in pageshow or load event of the page.
Goodluck
put this on pageshow event of Menu:
var popUPValue = localStorage.getItem("_ValpopUp");
if(popUPValue == ""){
//change "popup" to the name of your popup
Appery.navigateTo('popup', {
transition: 'none'
});
}
Hi Nicklass,
put this on Load event of Menu:
var popUPValue = localStorage.getItem("_ValpopUp");
if(popUPValue == ""){
//change "SamplePopUP" to the name of your popup
Appery( "SamplePopUP" ).popup( "open", {transition:"slideup"} )
}
//then on your popup add button and add this jscript:
localStorage.setItem("_ValpopUP","opened");
Appery("SamplePopUP").popup("close");
Goodluck