2014-02-25 67 views
0

後有點試驗和錯誤,我得到了一個遠程模式窗口加載和銷燬內容與引導3.0.1引導3.1.0模態遠程內容

passing a parameter to remote modal in bootstrap 3

這裏是代碼片段

$(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內容,cananyone點爲例

回答

0

認爲我有答案...

<!-- 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 --> 
語法

是遠程內容的語法