$. mobile.loadPage is the method you need. It allows you to upload an external html file and embed it in dom. By default, for this method you need to load it as a whole page, so you need to specify options to load into the dom element. This is an example (and unverified) code:
$('#clickButton').on("click",function(){
$.mobile.loadPage("theURLofThePage",{pageContainer: $('#container')})
});
don't forget about CrossDomain's security issue. I managed to make this work in firefox by adding:
$("#landingPage").live('pageinit', function() {
jQuery.support.cors = true;
$.mobile.allowCrossDomainPages=true;
});
, div data-role = page (, id = 'secondPage'). data-role = page id = secondPage div:
$('#secondPage").trigger('pagecreate');