How can I navigate between pages inside a PhoneGap application?

Spread the love

Question Description

I am newbie with PhoneGap and I’m a little bit lost.
I have installed and run the example app and it works ok. Now I want to change a little the default app.
I want a button or link to change from the current page/view to another I have in the “www” folder. If I use “…” it opens Safari.

How can I navigate between views/pages inside a PhoneGap application?

Practice As Follows

You can use mobile web UI frameworks that work on top of PhoneGap like Sencha Touch or jQuery Mobile. They have view stacks already integrated and are easy to work with.

Or you could do what I do and create your own view stack from scratch, which isn’t nearly as hard as it may sound. I use PhoneGap along with xuijs to transition full screen, fixed position divs that represent “views”.

Be sure to use CSS3 transitions instead of javascript animation when possible and they will perform much better.

Leave a Comment