Jquery mobile jQuery Mobile-如何在另一个html页面中链接包含一些ajax的html页面

Jquery mobile jQuery Mobile-如何在另一个html页面中链接包含一些ajax的html页面,jquery-mobile,cordova,Jquery Mobile,Cordova,我使用phoneGap和jQuery Mobile开发了一个应用程序。在第一个页面上有一个导航栏,用户单击该导航栏可以导航到一个页面,该页面还包含一些ajax调用以从服务器获取JSON提要。我在做下面的事情 <ul> <li><a href="sites.html" data-icon="home" class="ui-btn-active">My</a></li> <li><a href="profile.h

我使用phoneGap和jQuery Mobile开发了一个应用程序。在第一个页面上有一个导航栏,用户单击该导航栏可以导航到一个页面,该页面还包含一些ajax调用以从服务器获取JSON提要。我在做下面的事情

<ul>
  <li><a href="sites.html" data-icon="home" class="ui-btn-active">My</a></li>
  <li><a href="profile.html" data-icon="gear">Recent</a></li>
</ul>
但是页面没有加载。但是如果我直接打开页面,它会很好地工作。我的ajax调用在document.ready()事件中


我能为此做些什么

我不熟悉phone gap,但jQuery Mobile会自动将内部链接转换为ajax呼叫。您不应该对
文档.ready()执行任何操作


在jQuery Mobile中,
document.ready()
仅在加载初始页面时触发。另外,由于jquerymobile仅在加载新页面时才拉入内容,因此不会执行标题中的任何内容。要模拟
document.ready()
在其他页面上的效果,请执行以下操作:

$('#aboutPage').live('pagecreate',function(event){
alert('This page was just enhanced by jQuery Mobile!');
// Insert the calls that were in the document.ready() here.
});

对不起,我想我没有正确解释我的问题。我在document.ready()函数中所做的是调用服务器获取一些提要。我所经历的是,当我浏览这些页面的链接时,我无法让这些电话工作。如果它工作,如果您通过单击“我的答案”旁边的复选标记“接受”我的答案,我将不胜感激。谢谢