cannot dynamically create page and change to it and update hash

cannot dynamically create page and change to it and update hash

i tried to dynamically create a page and change to it, but the hash is not updated. here is what i have done.
i am on a page called index.php, then i do

var id = "display-page";
$("#display-page").remove();            // just in case it is already there
var page = $("<div data-role='page' id='" + id + "' data-dom-cache='true'></div>").appendTo(document.body);
      // here i put some contents into the page by appending to page

page.page();
    $.mobile.pageContainer.pagecontainer("change", page, {allowSamePageTransition:true,
                                                                                             changeHash:true,
                                                                                            data:null,
                                                                                           reload:true,
                                                                                           reloadPage:true,
                                                                                           showLoadMsg:true,
                                                                                           transition:"slide",
                                                                                           type:"GET"});

now since changeHash is true and my page div has an id, the url should display as
index.php#display-page

but it shows just index.php, and no hash change at all.
this way, i cannot go back anymore. $.mobile.back() will take me to the page before index.php which does not exist at the moment since index.php is the first page that is loaded.

am i doing something wrong?

thanks for all your help