<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>

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

        时间:2023-06-21
          <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();
                      });
                  });
                  

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

                  上一篇:Twitter Bootstrap - 为什么我的模态与背景一样褪色? 下一篇:Draggable JS Bootstrap modal - 性能问题

                  相关文章

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

                    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>
                    3. <tfoot id='72Rt5'></tfoot>