Pages not directly in the body but inside other elements
Hi there! Please consider the following code fraction...
- <body>
- <div id="page1" data-role="page">..... </div>
- <div id="page2" data-role="page">..... </div>
- <div>
- <div id="page3" data-role="page">..... </div>
- <div id="page4" data-role="page">..... </div>
- </div>
- </body>
As you can see, page3 and page4 are under div element, whereas page1 and page2 are directly inside the body. There is a specific reason I have to follow this structure.
I'm using the following to switch between pages:
- $.mobile.changePage('#page1', { changeHash: false });
It works only for page 1 and 2 but NOT for 3 and 4. Can I make it to work for all four with this structure?