I have a 3 page structure like this:
index.html
test.html
folder1/page1.html
I use this script for navigation:
$(".navigate").on("vclick", function(event){
event.preventDefault(); $.mobile.pageContainer.pagecontainer ("change",$(this).attr("id")+".html" );
});
Each page has a link like this:
index.html => <a class="navigate" id="test">TEST</a>
test.html => <a class = "navigate" id="folder1/page1">PAGE1</a>
All navigations use Ajax transitions.
The problem is when I navigate to page1.html
via index.html -> test.html
and from page1.html
, if I navigate back to index.html
using the browser back button and again navigate to page1.html
as stated above my page1.html
, it automatically redirects back to events.html
, but the URL will be showing the proper address of page1.html
The same errors occur without any pattern.
What is happening here?
So I thought of disabling ajax navigation for few particular links dynamically:
$(".someClass").on("vclick", function(){ $.mobile.pageContainer.pagecontainer ("change", $(this).attr("id")+".html", {reload: true}); });
But even this does not work. Because page does not refresh at all. Can someone sort this out?