2016-08-18 57 views
0

我不知道哪個原因,但我正確地將data-toggledata-target分配給我的按鈕。單擊具有偵聽器的相應按鈕後,我的模式將不會顯示。任何幫助爲什麼它不會顯示?爲什麼當按鈕被點擊時模態不會顯示錶格數據?

@section ('content') 
<div class = "row"> 
    <div class = "col-md-12"> 
     <table class = "table"> 
      <thead> 
       <tr> 
        <th>Title</th> 
        <th>Content</th> 
        <th>Category</th> 
        <th>Approver</th> 
        <th>Date Sent</th> 
        <th>Action</th> 
        <th>Status</th> 
       </tr> 
      </thead> 
      <tbody> 
       <tr class = "info"> 
        <td></td> 
        <td></td> 
        <td></td> 
        <td></td> 
        <td></td> 
        <td> 
         <button type="submit" 
           class="btn btn-success glyphicon glyphicon-thumbs-up" 
           data-toggle="modal" 
           data-target="#myModal"> Approve</button> 
        </td> 
        <td></td> 
       </tr> 
      </tbody> 
     </table> 
     <div class = "modal fade" id = "myModal"> 
      <div class = "modal-dialog"> 
       <div class = "modal-content"> 
        <div class = "modal-header"> 
         <h4>Confirm Approve</h4> 
        </div> 
        <div class = "modal-body"> 
        </div> 
       </div> 
      </div> 
     </div> 
    </div> 
</div> 
@endsection 
+1

檢查您的控制檯,看看是否有任何錯誤/警告。 –

+0

@MuhammadSumonMollaSelim我檢查我的控制檯,但沒有錯誤或警告。我正在使用Chrome。 – Francisunoxx

回答

0

是否有任何模態頁腳?你是否只使用表格來佈局一個特定的事物?

+0

是的。我沒有modal-footer。 – Francisunoxx

0

嘗試使用本作的模態

<div class="modal fade" id="myModal" tabindex="-1" role="dialog" aria-labelledby="myModalLabel"> 
    <div class="modal-dialog" role="document"> 
    <div class="modal-content text-center"> 
     <div class="modal-header"> 
     <h2 class="modal-title" id="myModalLabel"> - content- </h2> 
     </div> 
     <div class="modal-body"> 
     -content- 
     </div> 
     <div class="modal-footer"> 
     -content- 
     </div> 
    </div> 
    </div> 
</div> 
相關問題