2

如何添加带有哈希的使用链接与没有哈希的链接相同?(例如:mySubpage* #test *)。

我仍然想为 naviagion 使用 jQuery 移动功能,只需对链接进行哈希处理!

示例 (HTML)

<div data-role="navbar" data-grid="d">
    <ul>
        <li><a href="http://orf.at">Google</a>
        </li>
        <li><a href="http://google.com#test">Google with hash (not working)</a>
        </li>
    </ul>
</div>

提琴手

4

1 回答 1

2

像这样添加它:

 <li><a href="http://google.com#test" rel="external">Google with hash (not working)</a>

基本上你需要添加rel="external"属性。将这个链接作为外部页面打开是 jQuery Mobile 的标志。

官方文档:链接页面

于 2013-04-10T12:33:20.247 回答