<legend id='FeCwO'><style id='FeCwO'><dir id='FeCwO'><q id='FeCwO'></q></dir></style></legend>
  • <small id='FeCwO'></small><noframes id='FeCwO'>

      <tfoot id='FeCwO'></tfoot>

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

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

        如何通过在模态窗口外单击来关闭模态?

        How to close a modal by clicking outside the modal window?(如何通过在模态窗口外单击来关闭模态?)
          <tbody id='dowRI'></tbody>

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

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

                • <bdo id='dowRI'></bdo><ul id='dowRI'></ul>
                  本文介绍了如何通过在模态窗口外单击来关闭模态?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着跟版网的小编来一起学习吧!

                  问题描述

                  在一个非常简单的 jQuery 模式中,我通过单击 CLOSE as 来关闭模式

                  In a very simple jQuery modal, I close the modal by clicking on CLOSE as

                  $('#close').click(function(e) {
                    e.preventDefault();
                    $('#overlay, #alertModalOuter').fadeOut(400, function() {
                       $(this).remove();
                    });
                  });
                  

                  如何通过单击关闭按钮(位于模态窗口内)或单击模态窗口外的任何位置来关闭模态.

                  How can I close the modal by clicking whether on CLOSE button (which is inside the modal windows) OR clicking anywhere outside the modal window.

                  推荐答案

                  像这样改变你的函数应该可以工作:

                  Changing your function like so should work:

                      $('#close, #overlay').click(function(e) {
                        e.preventDefault();
                        $('#overlay, #alertModalOuter').fadeOut(400, function() {
                        $('#close').remove();
                      });
                  });
                  

                  这篇关于如何通过在模态窗口外单击来关闭模态?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持跟版网!

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

                  相关文档推荐

                  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(如何在页面加载时显示正在运行的进度条)

                      <bdo id='72Rt5'></bdo><ul id='72Rt5'></ul>
                          <tbody id='72Rt5'></tbody>

                      1. <small id='72Rt5'></small><noframes id='72Rt5'>

                        <legend id='72Rt5'><style id='72Rt5'><dir id='72Rt5'><q id='72Rt5'></q></dir></style></legend>
                      2. <i id='72Rt5'><tr id='72Rt5'><dt id='72Rt5'><q id='72Rt5'><span id='72Rt5'><b id='72Rt5'><form id='72Rt5'><ins id='72Rt5'></ins><ul id='72Rt5'></ul><sub id='72Rt5'></sub></form><legend id='72Rt5'></legend><bdo id='72Rt5'><pre id='72Rt5'><center id='72Rt5'></center></pre></bdo></b><th id='72Rt5'></th></span></q></dt></tr></i><div id='72Rt5'><tfoot id='72Rt5'></tfoot><dl id='72Rt5'><fieldset id='72Rt5'></fieldset></dl></div>
                        • <tfoot id='72Rt5'></tfoot>