I have created dynamic page with this code and this works fine:
var b = $('body');
$('<div data-role="page" id="test" data-theme="b">').appendTo(b).page();
After the creation of the page, I want to change the page to this:
$.mobile.changePage('#test", { transition: "none"});
The problem is that this isn’t working because it cannot find the page that I created before. I think there needs a refresh or something I don’t know exactly how.
Try following: after appending and before changing the page call
$.mobile.initializePage();.