Reputation: 21
Is it possible to "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");
});
Upvotes: 1
Views: 12454
Reputation: 11
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).
Upvotes: 1
Reputation: 16915
And why not
$(document).bind("mobileinit", function(){
document.location.href="whereever";
});
or just
<script>
document.location.href="whereever";
</script>
or even with a metatag?
Upvotes: 3