Android Phonegap JQM对话框在新页面而不是对话框中打开

时间:2013-06-29 22:18:51

标签: android jquery html5 jquery-mobile cordova

感谢您抽出宝贵时间阅读我的问题。我正在尝试使用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/

此处还有我想要获得的屏幕截图。

enter image description here

这就是我所拥有的:

enter image description here

1 个答案:

答案 0 :(得分:0)

您可以使用cordova定义的自定义对话框。

check this

这可能会对你有帮助。