I notice that the page that I was just viewing is still in the DOM. Is there a way to remove the last page viewed after I transition to the new page using changePage()?
I'm not sure if it's related to your issue - but there was a JQM fix that went in yesterday related to errors when attempting to delete DOM elements: https://github.com/jquery/jquery-mobile/commit/d4c7b5da66641a3fd081a834ca3d12a5518d499b
Not exactly knowing your markup I am guessing you are triggering changePage()
manually. If that is the case, you could wire up one of the events listed here.
pageshow
Triggered on the page being shown, after its transition completes.
$('div').live('pageshow',function(event, ui){
$(ui.prevPage).remove();
});
Example on jsfiddle.