I am fairly new at JQM and i am trying to build mobile application using jQuery Mobile.
Below is what i am trying to achieve..
I have few HTML pages with each having its own css, javascript and JQM pages. What i need is when i change to another html file and do back on the back button using data-rel="back" i get restored to the previous html file in the state i left it in.
I tried using pagecontainer change function, but it does not load javascript on the new loaded html file. It tried using the following code.
$( document ).on( "vclick", '.openTutorial', function(){
$.mobile.pageContainer.pagecontainer("change", "tutorial.html", {
reload : true
});
});
Also i tried another option which was pagecontainer load but this time its not even redirecting. I used the following code.
$( document ).on( "vclick", '.openTutorial', function(){
$.mobile.pageContainer.pagecontainer("load", "tutorial.html", { });
});
Is it achievable in JQM.
If Yes then how do i navigate to the other html file so that its javascript and css in the head get loaded. And when i go back using data-rel="back" the previous state is restored.
If No then how do i achieve this. I mean what changes should i make..
Thanks.. Much appreciate any help.
See Question&Answers more detail:
os 与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…