jQuery的移动多页无法正常工作 [英] jquery mobile multipage wont work

查看:98
本文介绍了jQuery的移动多页无法正常工作的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

请帮助,

jquery移动多页面将无法工作.它仅显示按钮,而在单击时不会导航到其内部页面.直接访问该页面时,效果很好.

jquery mobile multipage wont work when a page is called from another page. It only displays the buttons but doesnt navigate to its internal pages when clicked. It works fine when the page is access directly.

<!-- Page 1-->
<div data-role="page" id="description" data-title="Description">
<div data-role="header"  data-position="fixed" data-theme="d">
<!-- header 1-->`enter code here`
</div>  
</div>
<div data-role="content">
<!--- content 1-->
</div>
<div data-role="footer"  data-position="fixed" data-theme="d">
<div data-role="navbar"  data-iconpos="bottom">
<ul>
<li><a href="#description" data-role="button" data-icon="star">Description</a></li>
<li><a href="#physicians" data-role="button" data-icon="star">Physicians</a></li>
</ul>
</div>
</div>
</div>

<!-- Page 2-->
<div id="Physicians" data-role="page" data-title="Physicians">
<div data-role="header"  data-position="fixed" data-theme="d">
<!-- header 2 -->
</div>
<div data-role="content">
<!-- content 2 -->
</div>
<div data-role="footer"  data-position="fixed" data-theme="d">
<div data-role="navbar"  data-iconpos="bottom">
<ul>
<li><a href="#description" data-role="button" data-icon="star" data-transition="pop">Description</a></li>
<li><a href="#physicians" data-role="button" data-icon="star" data-transition="pop">Physicians</a></li>
</ul>
</div>
</div>
</div>

推荐答案

尝试将属性rel="external"添加到锚点.

Try adding to the anchor the attribute rel="external".

示例:

<a href="#description" data-role="button" data-icon="star" rel="external">Description</a>

这篇关于jQuery的移动多页无法正常工作的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆