Jquery页面未完全加载/显示
我有一个JQuery移动页面,其中有几个链接。问题是,当我点击一个按钮进入下一页时,所有元素都没有完全显示出来(例如页脚和其他一些元素)。我必须刷新页面才能看到全部内容。任何帮助都将不胜感激Jquery页面未完全加载/显示,jquery,jquery-mobile,Jquery,Jquery Mobile,我有一个JQuery移动页面,其中有几个链接。问题是,当我点击一个按钮进入下一页时,所有元素都没有完全显示出来(例如页脚和其他一些元素)。我必须刷新页面才能看到全部内容。任何帮助都将不胜感激 <body data-role="body"> <header data-role="header"> <a href="" data-role="button" data-transition="fade" data-icon="gear">S
<body data-role="body">
<header data-role="header">
<a href="" data-role="button" data-transition="fade" data-icon="gear">Settings</a>
<h1>App</h1>
<a href="base.php" data-role="button" class="ui-btn-right" data-transition="fade" data-icon="home">Home</a>
<? require'includes/navbar.php'; ?>
</header>
<div data-role="content" id="basecontent">
<a href="#" id="profile" data-transition="fade" data-rel="dialog" data-role="button">Create A profile</a>
<a id="findshuttle" href="shuttleview.php" data-transition="fade" data-role="button">Find the Shuttle</a>
<a id="where" href="whereami.php" data-transition="fade" data-role="button">where am I</a>
</div>
</body>
<? require'includes/footer.php'; ?>
应用程序
听起来我问得不好。假设我去了www.foo.com,所有东西都加载得很好,但是如果我导航到foo.com/bass,页面就会部分加载。如果重新加载foo.com/bass,所有内容都会呈现,但如果我尝试返回foo.com,页面会部分加载。根据您在此处发布的内容,您的导航栏似乎位于文档的底部,而页脚位于结束标记的下方。如果这些元素不在页面的open标记内,则不会显示
<body data-role="body">
<header data-role="header">
<a href="" data-role="button" data-transition="fade" data-icon="gear">Settings</a>
<h1>App</h1>
<a href="base.php" data-role="button" class="ui-btn-right" data-transition="fade" data-icon="home">Home</a>
</header>
<!--Move this below header-->
<? require'includes/navbar.php'; ?>
<div data-role="content" id="basecontent">
<a href="#" id="profile" data-transition="fade" data-rel="dialog" data-role="button">Create A profile</a>
<a id="findshuttle" href="shuttleview.php" data-transition="fade" data-role="button">Find the Shuttle</a>
<a id="where" href="whereami.php" data-transition="fade" data-role="button">where am I</a>
</div>
<!--Move this above closing body tag-->
<? require'includes/footer.php'; ?>
</body>
应用程序
请不要将您的问题编辑到您开始否定以下答案的程度。听起来我好像问得不好。假设我去了www.foo.com,所有东西都加载得很好,但是如果我导航到foo.com/bass,页面就会部分加载。如果重新加载foo.com/bass,所有内容都会呈现,但如果我尝试返回foo.com,页面会部分加载。根据您提供的信息,我无法解释为什么它会起作用,因为通常不会向最终用户显示body标记之外的元素。我不太清楚这些页面是如何动态的,你有一个链接到一个例子吗?注意:最好的做法是使用长的PHP标记,而不是短的——即使用