what i'm trying to do is just load a content from another file to a div, just like $.ajax
using normal jquery.
in my main page:
<div data-role="page"> <button id="load" style="border: solid blue;">Click here to load</button> <div data-role="content" id="target"> <!-- ajax load here --> </div> </div>
this is the html from another file:
<div id="secondPage" style="border:solid red;"> <p>test</p> </div>
and finally, the js:
$("body").on("click", "#load", function () { $.mobile.loadPage("mobile/favorites", { pageContainer: $('#target'), type: 'post', reloadPage: true }); });
no erros appears to me, the url load the content as i checked in the chrome debug.
so, what i'm missing ?