Skip to content

Instantly share code, notes, and snippets.

View shashikantkumar88's full-sized avatar

Shashikant shashikantkumar88

  • xpointers consulting private limited
  • Pune
View GitHub Profile
/* Dynamically create a page and navigate to it.
(and include the page in browser history ) */
//create markup
var newPage = $("<div data-role=page data-url=yay><div data-role=header><h1>YAY!!!!</h1></div><div data-role=content><img src=http://bukk.it/yay.gif /></div></div");
//append it to the page container
newPage.appendTo( $.mobile.pageContainer );
//go to it