<small id='gwU5v'></small><noframes id='gwU5v'>

  • <tfoot id='gwU5v'></tfoot>
    <i id='gwU5v'><tr id='gwU5v'><dt id='gwU5v'><q id='gwU5v'><span id='gwU5v'><b id='gwU5v'><form id='gwU5v'><ins id='gwU5v'></ins><ul id='gwU5v'></ul><sub id='gwU5v'></sub></form><legend id='gwU5v'></legend><bdo id='gwU5v'><pre id='gwU5v'><center id='gwU5v'></center></pre></bdo></b><th id='gwU5v'></th></span></q></dt></tr></i><div id='gwU5v'><tfoot id='gwU5v'></tfoot><dl id='gwU5v'><fieldset id='gwU5v'></fieldset></dl></div>

    1. <legend id='gwU5v'><style id='gwU5v'><dir id='gwU5v'><q id='gwU5v'></q></dir></style></legend>
        • <bdo id='gwU5v'></bdo><ul id='gwU5v'></ul>

        如何通过单击框覆盖的区域之外来关闭 jQuery UI 模式对话框?

        How to close a jQuery UI modal dialog by clicking outside the area covered by the box?(如何通过单击框覆盖的区域之外来关闭 jQuery UI 模式对话框?)

        <small id='bxwJV'></small><noframes id='bxwJV'>

          <tbody id='bxwJV'></tbody>

            • <i id='bxwJV'><tr id='bxwJV'><dt id='bxwJV'><q id='bxwJV'><span id='bxwJV'><b id='bxwJV'><form id='bxwJV'><ins id='bxwJV'></ins><ul id='bxwJV'></ul><sub id='bxwJV'></sub></form><legend id='bxwJV'></legend><bdo id='bxwJV'><pre id='bxwJV'><center id='bxwJV'></center></pre></bdo></b><th id='bxwJV'></th></span></q></dt></tr></i><div id='bxwJV'><tfoot id='bxwJV'></tfoot><dl id='bxwJV'><fieldset id='bxwJV'></fieldset></dl></div>
                <tfoot id='bxwJV'></tfoot>
                  <bdo id='bxwJV'></bdo><ul id='bxwJV'></ul>

                  <legend id='bxwJV'><style id='bxwJV'><dir id='bxwJV'><q id='bxwJV'></q></dir></style></legend>
                  本文介绍了如何通过单击框覆盖的区域之外来关闭 jQuery UI 模式对话框?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着跟版网的小编来一起学习吧!

                  问题描述

                  我正在使用 jQuery 1.6 和 jQuery UI.我成功实现了一个 模态对话框 窗口,其宽度几乎是我的应用程序网页宽度的 50%.我想给用户另一种关闭对话框的方法,这样当他她点击页面上模态框"覆盖的区域之外时,这个对话框就会被关闭,就好像用户点击右上角的标准"x"按钮.

                  I am using jQuery 1.6 and jQuery UI. I successfully implemented a modal dialog window which width is almost 50% of my application web page' width. I would like to give to the user another way to close the dialog so that when heshe clicks outside the area covered on the page by the "modal box", this one will be closed as if the user clicked on the "standard" "x" button on the top-right of that.

                  我该怎么做?

                  推荐答案

                  澄清一下,Victor 的回答只有在对话框设置为 autoOpen: true(对话框的默认值)时才有效,并且您不会再次打开带有事件的对话框.如果您在任何时候使用 click 之类的事件打开对话框,无论 autoOpen 设置为 true 还是 false,那么你必须使用 jQuery.live.

                  To clarify, the answer by Victor only works if the dialog is set to autoOpen: true, the default value of the dialog, and you do not open the dialog again with an event. If you open the dialog with an event like click at any point whether autoOpen is set to true or false, then you have to use jQuery.live.

                  autoOpen: false 演示覆盖 click 事件的失败:http://jsfiddle.net/GKfZM/

                  Fiddle demonstrating failure of overlay click event with autoOpen: false: http://jsfiddle.net/GKfZM/

                  Fiddle 演示 live 如何与 autoOpen: falseclick 事件一起工作:http://jsfiddle.net/GKfZM/1/

                  Fiddle demonstrating how live works with autoOpen: false and with click event: http://jsfiddle.net/GKfZM/1/

                  总结:维克多的答案只在特定条件下有效.

                  Summary: Victor's answer only works under certain conditions.

                  教程链接

                  这篇关于如何通过单击框覆盖的区域之外来关闭 jQuery UI 模式对话框?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持跟版网!

                  本站部分内容来源互联网,如果有图片或者内容侵犯了您的权益,请联系我们,我们会在确认后第一时间进行删除!

                  相关文档推荐

                  Draw border around nontransparent part of image on canvas(在画布上的图像不透明部分周围绘制边框)
                  dragging and resizing an image on html5 canvas(在 html5 画布上拖动图像并调整其大小)
                  What#39;s the difference between a boolean as primitive and a boolean as property of an object?(作为原始对象的布尔值和作为对象属性的布尔值有什么区别?)
                  I want to do animation of an object along a particular path(我想沿特定路径对对象进行动画处理)
                  How to upload image into HTML5 canvas(如何将图像上传到 HTML5 画布中)
                  How to show a running progress bar while page is loading(如何在页面加载时显示正在运行的进度条)
                • <legend id='SKdr0'><style id='SKdr0'><dir id='SKdr0'><q id='SKdr0'></q></dir></style></legend>

                    <tfoot id='SKdr0'></tfoot>
                        <i id='SKdr0'><tr id='SKdr0'><dt id='SKdr0'><q id='SKdr0'><span id='SKdr0'><b id='SKdr0'><form id='SKdr0'><ins id='SKdr0'></ins><ul id='SKdr0'></ul><sub id='SKdr0'></sub></form><legend id='SKdr0'></legend><bdo id='SKdr0'><pre id='SKdr0'><center id='SKdr0'></center></pre></bdo></b><th id='SKdr0'></th></span></q></dt></tr></i><div id='SKdr0'><tfoot id='SKdr0'></tfoot><dl id='SKdr0'><fieldset id='SKdr0'></fieldset></dl></div>
                      1. <small id='SKdr0'></small><noframes id='SKdr0'>

                          <bdo id='SKdr0'></bdo><ul id='SKdr0'></ul>

                              <tbody id='SKdr0'></tbody>