mri*_*dul 3 html jquery twitter-bootstrap
在我的代码中有两个弹出窗口.首先是登录,第二次是重置密码.第二个弹出窗口的链接位于登录弹出窗口内.当我点击链接忘记密码时,我想自动关闭登录弹出窗口.
<a href="#" data-toggle="modal" data-target=".loginform">Login</a>
<!- Login Popup start-->
<div id="login" class="modal fade loginform" tabindex="-1" role="dialog" aria-labelledby="myLargeModalLabel" aria-hidden="true">
....
<label>
<input type="checkbox"><span style="font-size:12px;display:block;">Remember me</span>
</label>
</div>
</div>
</div>
</div>
<div class="modal-footer">
<a data-toggle="modal" data-target=".forgotpassword" href="#" style="float:left;font-size:14px;">Forgot Password</a>
<button type="button" class="btn btn-default" data-dismiss="modal">Close</button>
<button type="button" class="btn btn-primary">Login</button>
</div>
</div>
<!-- /.modal-content -->
</div>
</div>
<!- popuplogin end-->
<!- Popup forgot password start-->
<div id="forgot" class="modal fade forgotpassword" tabindex="-1" role="dialog" aria-labelledby="myLargeModalLabel" aria-hidden="true">
.......
<div class="modal-footer">
<button type="button" class="btn btn-default" data-dismiss="modal">Close</button>
<button type="button" class="btn btn-primary">Reset</button>
</div>
</div>
<!-- /.modal-content -->
</div>
</div>
<!- popup end-->
Run Code Online (Sandbox Code Playgroud)
yas*_*hhy 10
保留忘记密码链接的ID,然后单击"执行" $('#login').modal('hide');
$("#forgotPass").click(function(){
$('#login').modal('hide');
});
Run Code Online (Sandbox Code Playgroud)
在本文档中:http://getbootstrap.com/javascript/#modals
显示:
$('#myModal').modal('show');
隐藏:
$('#myModal').modal('hide');
归档时间: |
|
查看次数: |
30738 次 |
最近记录: |