【问题标题】:Bootstrap 3.1.0 modal remote contentBootstrap 3.1.0 模态远程内容
【发布时间】:2014-02-25 21:53:55
【问题描述】:

经过一番反复试验,我得到了一个远程模态窗口,使用 bootstrap 3.0.1 加载和销毁内容

passing a parameter to remote modal in bootstrap 3

这里是代码sn-p

$(document).ready(function(){
$('.pull-right').click(function(){

    var theid = this.id;

    //Open modal window passing the member id as a parameter        
    $('#myModal').modal({
    remote: '/plugins/mission/councilmember_popup.php?MemberID='+theid,
    show: true
    });
    //Destroy modal window content on close, otherwise parameter will be retained       
    $("#myModal").on('hidden.bs.modal', function () {
        $(this).data('bs.modal', null);
    });
}); 

});

我现在已经安装了 3.1.0,现在意识到远程模态不再起作用,我得到模态背景,但看不到模态窗口

似乎在 3.1.0 中找不到任何远程内容示例,谁能指点示例

【问题讨论】:

    标签: twitter-bootstrap modal-dialog


    【解决方案1】:

    我想我有答案...

    <!-- Modal -->
    <div class="modal fade" id="myModal" tabindex="-1" role="dialog" aria-labelledby="myModalLabel" aria-hidden="true">
    <!-- Modal content comes from the page in the href -->
    <div class="modal-dialog">
        <div class="modal-content">
    
        </div>         <!-- /modal-content -->
    </div>     <!-- /modal-dialog -->
    
    </div><!-- /.modal -->
    

    是主页面的语法

    <div class="modal-header">
                <button type="button" class="close" data-dismiss="modal" aria-hidden="true">&times;</button>
                 <h4 class="modal-title">Title</h4>
            </div>            <!-- /modal-header -->
              <div class="modal-body">
                            ...
              </div><!-- /modal-body -->
            <div class="modal-footer">
                <button type="button" class="btn btn-primary" data-dismiss="modal">Close</button>
            </div>            <!-- /modal-footer -->
    

    是远程内容的语法

    【讨论】:

      猜你喜欢
      • 2015-05-13
      • 1970-01-01
      • 2014-03-18
      • 1970-01-01
      • 1970-01-01
      • 2012-08-22
      • 2013-12-03
      • 1970-01-01
      • 2017-08-16
      相关资源
      最近更新 更多