0

我有一个 JQuery 移动页面,其中有几个链接。问题是,当我单击一个按钮转到下一页时,所有元素都没有完全显示(例如页脚和其他一些元素)。我必须刷新页面才能看到完整的内容。任何帮助,将不胜感激。

    <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,页面会部分加​​载。

4

1 回答 1

1

从您在此处发布的内容来看,您的导航栏似乎在您的文档中,而您的页脚位于结束标记下方。如果这些元素不在您页面的 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>
于 2012-04-23T15:10:45.037 回答