你如何在phonegap + jquerymobile上弹出对话框

How do you get dialog popup on phonegap + jquerymobile

本文关键字:对话框 jquerymobile phonegap      更新时间:2023-09-26

通过搜索/文档,我读到您所要做的就是在调用任何页面时使用data-rel="dialog",它应该将页面作为对话框打开。我正在使用适用于Android的Phone gap + jquery移动构建一个商店可提交应用程序(不是网络应用程序)。

点击下面的锚点将页面打开为常规页面而不是对话框。我做错了什么或没有做什么?

     <a href="use_coins.html" data-rel="dialog">Open dialog Box</a>

这是use_coins.html的 src

<div data-role="page" class="my-bg" id="use_coins_dialog">

    <div data-role="content">
        <p>Show coins here</p>
    </div><!-- /content -->
    </div><!-- /page -->

</body>

你必须引用所有这些:

<link rel="stylesheet" href="http://code.jquery.com/mobile/1.3.2/jquery.mobile-1.3.2.min.css" />
<script src="http://code.jquery.com/jquery-1.9.1.min.js"></script>
<script src="http://code.jquery.com/mobile/1.3.2/jquery.mobile-1.3.2.min.js"></script>

在包含以下内容的页面中

<a href="use_coins.html" data-rel="dialog">Open dialog Box</a>