【问题标题】:Android Phonegap JQM dialog is opening in new page instead of dialogAndroid Phonegap JQM 对话框在新页面而不是对话框中打开
【发布时间】:2014-02-04 17:44:44
【问题描述】:

感谢您抽出宝贵时间阅读我的问题。我正在尝试使用 Jquery mobile 打开一个对话框。我按照文档使用了 data-rel="dialog" 表示法和 data-transition="pop"。我没有出现在同一页面上的对话框,而是出现了一个全新的页面,其中出现了对话框。有人可以帮助我解决此功能。

这是我的初始主页代码:

<article>
                <ul data-role="listview" data-split-icon="star" data-split-theme="d" data-inset="true">
                    <li><a href="#black_seed_desc" data-rel="dialog"  ><img src="black_seed.jpg"/>
                        <h3>Black Seed Oil</h3>
                        </a>
                        <a href="#black_seed_purchase" data-rel="dialog" data-transition="pop">Purchase Black Seed Oil</a>
                    </li>
                </ul>
            </article>

这是我的对话框页面代码:

<div data-role="dialog" id="black_seed_purchase" data-theme="c">
    <section data-role="content">
        <h1>Purchase Black Seed Oil?</h1>
        <p>By purchasing Black Seed Oil you will receive
        an email receipt copy sent to you for your reference.</p>
        <a href="#purchase_blackseed" data-inline="true" data-corners="true" data-rel="back" data-role="button" data-shadow="true" data-iconshadow="true"
        data-wrapperrels="span">
        <span>
            <span>Buy: $49.99</span>
            <span>&nbsp;</span>
        </span>
        </a>
        <a href="#" data-role="button" data-rel="back" data-inline="true"       data-corners="true"
        data-wrapperrels="span" data-shadow="true" data-iconshawdow="true">
        <span>
            Cancel
        </span>
        </a>
    </section>
</div>

这是一个工作示例。 http://jsfiddle.net/Gajotres/w3ptm/?

这里还有一个我想要得到的屏幕截图。

这是我所拥有的:

【问题讨论】:

  • 对话框看起来像一个页面,而不是一个对话框?
  • 是的。它显示为一个页面。
  • 您确定所有标签都已关闭吗?
  • jsfiddle.net/Palestinian/S3Ddt 点击图标打开对话框。
  • 我认为这是androids phonegap jquerymobile 框架中的一个错误。当我将整个代码粘贴到 jfiddle 中时,它可以工作。

标签: android jquery html jquery-mobile cordova


【解决方案1】:

corodova 定义了一个自定义对话框,你可以使用它。

check this

这可能会对你有所帮助。

【讨论】:

    猜你喜欢
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 2012-04-25
    • 1970-01-01
    • 1970-01-01
    • 2021-12-03
    相关资源
    最近更新 更多