简体   繁体   English

如何在iOS主屏幕应用程序中使用多页jQuery移动文档?

[英]How can I use a multipage jQuery mobile document in a iOS Home Screen App?

I'm using data-ajax="false" to link to a multipage document, as this is required in order to trigger a full page refresh: 我正在使用data-ajax =“ false”链接到多页文档,因为触发全页刷新是必需的:

http://jquerymobile.com/demos/1.1.0-rc.1/docs/pages/page-navmodel.html http://jquerymobile.com/demos/1.1.0-rc.1/docs/pages/page-navmodel.html

This works fine within the full iOS Safari. 在完整的iOS Safari中可以正常工作。 But when I make the web app a Home Screen App, if you click on a link that has data-ajax="false", this will trigger the launch of the full Safari App, breaking the "full screen" appearance of my Home Screen App. 但是,当我将Web应用程序设为主屏幕应用程序时,如果单击具有data-ajax =“ false”的链接,则将触发启动完整的Safari应用程序,从而破坏了主屏幕的“全屏”外观应用程式

Is there any way to make a jQuery-mobile app that has a multipage document, that also can function as a fullscreen Home Screen App? 有什么方法可以制作具有多页文档的jQuery移动应用程序,该应用程序还可以用作全屏主屏幕应用程序?

<li><a href="/Account/SignOut" data-icon="back" data-ajax="false" class="logout">Log Out</a></li>

$(document).bind('pageinit', function() {
  $('.logout').click(function (event) {
    event.preventDefault();
    window.location.assign("/Account/SignOut");
  });
});

This was a STUPID chase but after 10 hours we used this solution. 这是一个愚蠢的追逐,但是10个小时后,我们使用了该解决方案。 It works great... but you shouldn't need this hack, Apple! 它很好用...但是您不需要这个hack,Apple!

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM