We have a jQM site for production here, how we do things - and yes others may disagree, but we found that this works for a very large site.
Use several separate HTML pages, the large multi-page template strikes the benefits of loading jQM ajax, since you load all your HTML at the beginning (if your site is not small)
You definitely want to use ajax loading, jQM only pulls the code in your <div data-role="page">
BUT this complicates your JS below
You do not need several JS files, but you need to load all your JS at the beginning, we will accomplish this by doing two things: 1. we put on
listener in the document root directory and listen to the pageinit / pageshow events. Each time a page loads, they start, you also have a convenient link to the current page, and you can use attr on the page to determine which page it was on. 2 .. All JS have some type (I hope you use PHP, CF or something else) and put this on every page, so no matter which entry point the user views the site on your mobile phone, they get all downloaded code
The disadvantage is that all JSs are loaded initially, but they are no different, and if this is really a concern in RequireJS - plus, this makes debugging easy, since JS has everything we can easily use the debugger and breakpoint. If you load JS dynamically on each page, you are increasing the data that you need to return on each transition to the page, and you have ugliness because you are reloading redundant JS and it is difficult to debug dynamic JS.
$(document).on('pageinit pageshow', 'div:jqmData(role="page"), div:jqmData(role="dialog")', function(oEvent){ var pageType = $(this).data('pagetype');
source share