Is it possible to 开发者_JAVA百科"redirect" users from a subpage ie. index.htm#sub-page to index.htm#home with the mobileinit function?
$(document).bind("mobileinit", function(){
$.mobile.changePage("/index.htm#home");
});
And why not
$(document).bind("mobileinit", function(){
document.location.href="whereever";
});
or just
<script>
document.location.href="whereever";
</script>
or even with a metatag?
$.mobile.changePage('#page_two');
This one worked for me.
Yes. If you use redirect, the non-ajax web page must reload more than 100KB of JQuery JS.... I still don't want to, but in some cases it must be done by page reload (to handle the PHP Session carefully).
精彩评论