Skip to content

Instantly share code, notes, and snippets.

@valnub
Last active March 16, 2018 07:46
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save valnub/323e51dbdb298313b314cc1a2b9b5ccf to your computer and use it in GitHub Desktop.
Save valnub/323e51dbdb298313b314cc1a2b9b5ccf to your computer and use it in GitHub Desktop.
F7 Welcomescreen auto close example
onDeviceReady: function() {
var options = {};
if (localStorage.getItem('welcomescreen_closed') === "true") {
options.open = false;
}
var app = new Framework7({
root: '#app', // or what ever your root is
name: 'welcomescreen-demo', // choose a name
welcomescreen: {
slides: welcomescreen_slides,
options: options,
},
});
$(document).on('click', '.tutorial-close-btn', function() {
welcomescreen.close();
localStorage.setItem('welcomescreen_closed', "true");
});
},
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment