Want to create dynamically pages on the fly? Want to use jsRender? Want to do it without overwhelming the browser? Here's how....
You want to use APIs? Want to create dynamically pages on the fly? Want to do it without overwhelming the browser? Here's how....
Note: Here is this same example done with jsRender. jsRender is now the stated direction for templating by the jQuery team. Thanks to @ziodave for pointing this out. Despite that, I am leaving this original post intact because it may still be useful to somebody.
Navigation is the hardest thing to get right in any application. Mobile only compounds the issue. jQuery Mobile doesn't (and shouldn't) have a pre-built global navigation structure. This leaves room for flexibly and creativity on the part of the designers, but also leaves some scratching their heads and wondering what to do. So, here are what I believe to be the three best ways to create global menus and the reasons why you might choose each.
Best Practice or Industry Standard?
Most mobile websites follow the “best practice” of including a link to the full site. It's usually in the footer and it usually links to the homepage of the full site. OK, great. The job is done right? Wrong! The best practice would be better labeled as the “industry standard” because there is a better way.