【问题标题】:JQuery Mobile - link from external page (SinglePage-template) to an internal page (MultiPage-template)JQuery Mobile - 从外部页面(SinglePage-template)链接到内部页面(MultiPage-template)
【发布时间】:2012-10-10 21:02:42
【问题描述】:

我有一个 JQuery 移动网站,它同时使用 multi-pagesingle-page 方法。现在我遇到了一个链接问题:当我在一个“外部”单页上时,我如何引用一个位于多页模板内的“内部”页面?

我的多页模板如下所示:

<body>
    <div id="mulitpage-wrapper">
        <msc:mobileHome />
        <msc:mobileTestDirectory />
        <msc:mobileContactUs />
    </div>
</body>

里面的页面是这样包裹的:

<div data-role="page" id="home">
     ...Some Header, Content and Footer...
</div>

我在 JQuery Mobile 中阅读了有关 linking 的信息,并且我已经尝试通过将 msc 标签包装在带有名称和 id 标签的 div 中来像锚一样链接它。我还尝试锚定多页子页面的“主页”ID,看起来像这样:

<a href="../mobile/index.asp#home">link</a> 

如何在此代码示例中实现从外部页面链接“mobileHome”?

还有一件事:当我将鼠标悬停在它上面时,Firefox 会显示正确的链接,当我复制粘贴该链接时,浏览器会加载正确的视图...

感谢任何帮助!

【问题讨论】:

    标签: asp.net mobile jquery-mobile


    【解决方案1】:

    尝试将属性rel="external" 添加到您的链接:

    <a href="../mobile/index.asp#home" rel="external>link</a> 
    

    试一试,让我知道这是否适合你:)

    【讨论】:

      猜你喜欢
      • 1970-01-01
      • 2011-12-28
      • 1970-01-01
      • 1970-01-01
      • 2021-09-27
      • 1970-01-01
      • 1970-01-01
      • 2012-12-12
      • 1970-01-01
      相关资源
      最近更新 更多