Jquery Mobile Popup不显示为按钮

时间:2013-05-14 17:48:00

标签: android jquery mobile

使用版本1.2.1

这是我的代码

<div data-role="page" id="page2">
    <div data-role="header" data-theme="e">
         <h3>
            Page 2
        </h3>
 <a data-role="button" data-direction="reverse" data-rel="back" href="#page2" data-icon="arrow-l" data-iconpos="left">
            Back
        </a>

    </div>
    <div data-role="content">
<a href="#popupBasic" data-rel="popup">Open Popup</a>

        <div data-role="popup" id="popupBasic">
            <p>This is a completely basic popup, no options set.
                <p>
        </div>
        <div data-role="footer" data-position="fixed" data-theme="e">
             <h4>
            footer
        </h4>

        </div>
    </div>

我已经包含了必要的文件。

<link rel="stylesheet" href="css/jquery.mobile-1.2.1.min.css" />
    <script src="http://code.jquery.com/jquery-1.7.1.min.js"></script>
    <script type="text/javascript" charset="utf-8" src="js/jquery.mobile-1.2.1.min.js"></script>

我将“OPEN POPUP”作为超级链接获取,因为它在Jquery docs网站中显示为按钮

检查此链接

Jquery Example Link

1 个答案:

答案 0 :(得分:0)

您忘记添加data-role="button" 到你的'a'标签

demo

您应该查看最新版本。您正在使用1.2.1 这是现在的遗产 jQuery Mobile v1.3.1