Execute function only the first time you open the page

3

I'm developing an app using Phonegap , it uses the front end to create apps, so I'd like to do the following:

  • run a specific function (such as an alert) the first time the application is opened? And it will no longer be shown unless the app is finished?
asked by anonymous 05.01.2016 / 14:16

1 answer

3

Use the initialize function, See an example on this site:

link

Code:

initialize: function() {
    this.bindEvents();
},

You can put the warning inside the function so it will only run when the app is started.

    
05.01.2016 / 14:23