0

我对 jQuery 移动版有疑问:

我有一个登录按钮,单击时应该会弹出登录表单,但是当页面加载时,弹出 div 不会隐藏...

我尝试了大约一百种不同的方法让它隐藏(通过添加一些 jQuery 移动属性),但没有任何效果。

编码:

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


<a href="#popupLogin" data-rel="popup" data-role="button" data-transition="pop" data-inline="true">Sign in</a>

<div data-role="popup" id="popupLogin" data-theme="a" data-overlay-theme="b" >
    <h3>Please sign in</h3>
    <label for="un">Username:</label>
    <input id="un" type="text" data-theme="a" placeholder="username" value="" name="user" />
    <label for="pw">Password:</label>
    <input id="pw" type="password" data-theme="a" placeholder="password" value="" name="pw">
    <div data-theme="b" aria-disabled="false">
</div> 

有人知道我在做什么错吗?谢谢

4

1 回答 1

7

JQM 1.1.0 版本破坏了有关弹出的功能。你可以试试 git 版本(不建议这样想)

http://code.jquery.com/mobile/latest/jquery.mobile.min.js http://code.jquery.com/mobile/latest/jquery.mobile.min.css

于 2012-05-21T08:04:33.313 回答