【问题标题】:Bootstrap 3.2.0 modal and remote content not visible close buttonBootstrap 3.2.0 模态和远程内容不可见关闭按钮
【发布时间】:2014-10-13 19:32:12
【问题描述】:

我使用 bootstrap 3.2.0 模态对话框来显示遥控器的内容,只有内容完全填满模态窗口,并且标题中的关闭按钮不可见。

这是我的代码:

  <a  href="#" data-remote="<?php echo dynamic url ?> #fragment" data-toggle="modal"     data-target="#myModal"></a>
 <div id="myModal" class="modal fade">
 <div class="modal-dialog">
    <div class="modal-content">

            <div class="modal-header">
                <button type="button" class="close" data-dismiss="modal" aria-hidden="true">&times;</button>
                <h4 class="modal-title">Event</h4>
            </div>
            <div class="modal-body">
                <p>Loading...</p>
            </div>
            <div class="modal-footer">
                <button type="button" class="btn btn-default" data-dismiss="modal">Close</button>
                <button type="submit" class="btn btn-primary">Save changes</button>
            </div>

    </div>
    <!-- /.modal-content -->
</div>
<!-- /.modal-dialog -->

  $('body').on('hidden.bs.modal','.modal',function(){ $(this).removeData('bs.modal');});

【问题讨论】:

  • 这应该可以工作。这在任何地方都在线吗?我会检查你的 css(使用开发工具)来确定 modal-header 是否被隐藏或设置为 display:none。
  • 我不使用任何 css 作为模态。我忘了提到模态页脚也不可见。

标签: ajax twitter-bootstrap twitter-bootstrap-3 modal-dialog


【解决方案1】:

我将您的代码粘贴到here

所以它没有任何问题。我认为data-remote="&lt;?php echo dynamic url ?&gt; 中的这个页面有错误 => modal can't load all then button close and modal-footer has not load yet.

【讨论】:

  • 你没有正确理解。用于远程捕获 ID 为#fragment 的容器内容的模态。
猜你喜欢
  • 1970-01-01
  • 1970-01-01
  • 1970-01-01
  • 1970-01-01
  • 1970-01-01
  • 1970-01-01
  • 1970-01-01
  • 2015-05-13
  • 2018-07-27
相关资源
最近更新 更多