Run function only the first time you open the page

Asked

Viewed 766 times

3

I’m developing an app using the Phonegap, the same uses the front-end to create apps, so I would like to do the following:

  • run a specific function (such as an alert) the first time the application is opened? And no longer be shown unless the app is finished?
  • 1

    It wouldn’t just put the function on the app startup?

  • using the app initiliaze right?

  • Yes. I imagine that would solve your problem right?

  • 1

    Yes, I’m new to phonegap, I appreciate the help

1 answer

3


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

http://pt.androids.help/q4068

Code:

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

can put the warning inside the function this way will only run when the app is started.

Browser other questions tagged

You are not signed in. Login or sign up in order to post.