简体   繁体   English

jQuery背景模态弹出窗口

[英]Jquery backdrop modal popup

I am looking for jQuery modal popup which should display image like sample check to show routing number etc,.. When I click on a Routing number(?)question mark it should pop-up an image and should have closing button on the top right corner. 我正在寻找jQuery模态弹出窗口,该窗口应该显示类似样本检查的图像以显示路由编号等。.当我单击路由编号(?)问号时,它应该弹出一个图像并且应该在右上角有关闭按钮角。 I have seen different approaches but couldnt find exact one 我见过不同的方法,但找不到确切的方法

Check out the Bootstrap Modal . 查看Bootstrap Modal Click the Launch demo modal button. 单击Launch demo modal按钮。

In <head> make sure you include the javascript for jquery and bootstrap.js . <head>确保包含用于jquerybootstrap.js的javascript。 You can download bootstrap.js from the bootstrap site. 您可以从引导站点下载bootstrap.js You also might want to include the bootstrap.css as well. 您可能还希望包括bootstrap.css

Once your <head> is all setup, in your body you need to add the modal code which will be hidden and you'll need to add a button to show the modal. 一旦<head>全部设置好,您就需要在身体中添加将被隐藏的模态代码,并且需要添加一个按钮以显示模态。 The button and modal are linked together by id . 按钮和模式通过id链接在一起。

<!-- Button to trigger modal -->
<a href="#myModal" role="button" class="btn" data-toggle="modal">Launch demo modal</a>

<!-- Modal -->
<div id="myModal" class="modal hide fade" tabindex="-1" role="dialog" aria-labelledby="myModalLabel" aria-hidden="true">
  <div class="modal-header">
    <button type="button" class="close" data-dismiss="modal" aria-hidden="true">×</button>
    <h3 id="myModalLabel">Modal header</h3>
  </div>
  <div class="modal-body">
    <p>One fine body…</p>
  </div>
  <div class="modal-footer">
    <button class="btn" data-dismiss="modal" aria-hidden="true">Close</button>
    <button class="btn btn-primary">Save changes</button>
  </div>
</div>

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM