2016-10-24 2 views
0

두 개의 버튼이 옆에 있습니다. 첫 번째는 #myModal의 데이터 타겟으로 모달을 열고 두 번째 버튼은 #largeModalTwo의 데이터 태그 세트로 데이터를 엽니 다. 문제는 첫 번째 작품은 괜찮 았지만 두 번째 버튼을 클릭하면 화면이 어두워지며 모달은 열리지 않습니다.두 번째 모달 버튼이 모달을 열 수 없습니다.

이것은 부트 스트랩 4입니다. 버그 일 수 있습니까? 여기

는 부트 스트랩의 codepen

   <div id="fullWidthContButtons"> 
       <div class="container-fluid centerthisouter" style="margin-top: 25px;"> 
        <div class="page-header centerthisinner centerthisouter"> 
         <button type="button" class="btn btn-primary modalLaunch" data-toggle="modal" data-target="#myModal"> 
          <h3 class="title">test data</h3> <i class="fa fa-external-link open-seseme" aria-hidden="true"></i> </button> 
        </div> 
       </div> 
       <div class="container-fluid centerthisouter" style="margin-top: 25px;"> 
        <div class="page-header centerthisinner centerthisouter"> 
         <button type="button" class="btn btn-primary modalLaunch" data-toggle="modal" data-target="#largeModalTwo"> 
          <h3 class="title">test data 2</h3> <i class="fa fa-external-link open-seseme" aria-hidden="true"></i> </button> 
        </div> 
       </div> 
      </div> 




      <div class="modal fade bd-example-modal-lg" id="myModal" tabindex="-1" role="dialog" aria-labelledby="myModalLabel"> 
       <div class="modal-dialog modal-lg" role="document"> 
        <div class="modal-content"> 
         <div class="modal-header"> 
          <button type="button" class="close" data-dismiss="modal" aria-label="Close"><span aria-hidden="true">&times;</span></button> 
          <h4 class="modal-title" id="myModalLabel">Load JSON</h4> </div> 
         <div class="modal-body centerthisouter"> 
          <button type="button" class="btn btn-primary centerthisinner sm-margin" id="loadJson">Load JSON file to create table</button> 
          <table class="table table-striped" id="data_table" /> </div> 
        </div> 
       </div> 
      </div> 
      <div id="largeModalTwo" class="modal fade bs-example-modal-lg" tabindex="-1" role="dialog" aria-labelledby="myLargeModalLabel"> 
       <div class="modal-dialog modal-lg" role="document"> 
        <div class="modal-content"> ... </div> 
       </div> 
      </div> 
+0

예, 그것은 버그가 수 (4 부트 스트랩은 내가 생각하는 알파 아직) . 이것에 코데 픈을 넣을 수 있습니까? – staypuftman

+0

네, 고맙습니다. @staypuftman 여기에 있습니다 : http://codepen.io/anon/pen/QKYXyb –

답변

2

없음 버그 당신의 HTML의 슈퍼 사소한 오류입니다. <table> 첫 번째 모달 예제에서와 같이 속성이 HTML에서 자체 닫히지 않습니다. 요소가 닫히지 않았으므로 부트 스트랩에서 모달 JS를 버리고 있다고 생각합니다.

modal body에서 마이너 코드의 변화와 당신이 갈 수 있습니다 codepen를 개정

<div class="modal-body centerthisouter"> 
    <button type="button" class="btn btn-primary centerthisinner sm-margin" id="loadJson"> 
     Load JSON file to create table 
    </button> 
    <table class="table table-striped" id="data_table"></table> 
    </div> 

을 : http://codepen.io/staypuftman/pen/wzNVxP

+0

네, 고마워요! 완벽하게 일했다. –

관련 문제