【发布时间】:2015-05-28 15:46:42
【问题描述】:
我正在开发一个 jQuery Mobile Web 应用程序。它是一个 index.html 文件,其中包含多个页面,使用 data-role="page"。每个页面都使用相同的页眉和页脚,所以我使用.load() 在我的项目中加载单独的 html 文件。
这在 Chrome 中按预期工作,但在我将应用程序安装到运行 iOS 8.3 的 iPhone 时却不行。页眉和页脚根本不加载。
/*** load headers and footer ***/
$(document).on('pageinit', function() {
/* header */
$('.customHeader').load('../templates/header.html');
/* footer */
$('.customFooter').load('../templates/footer.html');
/* dining */
$('.banner.dining').load('../templates/dining.html');
});
【问题讨论】:
-
除了将域列入白名单之外,您是否找到了解决方案?
标签: jquery-mobile phonegap-build