javascript - jQuery back button does not work properly after refresh -
on jquery mobile app;
on menu.html , inside body go help.html;
.... $(document).off('pageinit', '#menupage').on('pageinit', '#menupage', function() { $(document).off('click', '#help').on('click', '#help', function(){ $.mobile.changepage("help.html", { reloadpage: true, transition: "flip", reverse: false }); }); } .... <li><a id="help" href="#" role="link" data-role="none"> <div class="img help"></div> <div class="menutitle langmenuitem3">help</div> <div class="arrow"></div> </a></li>
then on help.html page have button go menu.html:
<header data-role="header"> <a href="#" data-rel="back" class="button" data-role="none"> <div class="arrow_reverse"></div><span class="langback">terug</span> </a> <div class="pagetitle">over deze app</div> </header>
my problem works under normal conditions, but if make refresh on menu.html, go help.html and then go menu again, menu.html not load properly, can see page visually loaded ok on firebug see necessary javascripts inside tags not hit anymore, never hits javascripts anywhere on menu.html anymore, loads previous html cache thats all. page title of menu.html not change correctly , stays "help" after point.
my full menu.html looks this;
any ideas?
do way.
give button id
<a href="#" id="backbtn" class="button"> <div class="arrow_reverse"></div><span class="langback">terug</span> </a>
and add below code in help.html
$('#backbutton').off('click').on('click', function () { $.mobile.changepage("menu.html", { reloadpage: true, transition: "flip", reverse: true }); });
Comments
Post a Comment