2014-02-16 95 views
3

我正在使用codeigniter開發php網站。我需要添加彈出窗口時點擊「立即預訂」按鈕在我的視圖(profile.php)下面的代碼是在HTML頁面中完美工作沒有任何問題,但是當我混合PHP標籤彈出窗口來快速分散。這是我使用的代碼我找不到問題,並注意快速幫助,可以有人解釋這裏的錯誤?無法顯示按鈕上的彈出窗口點擊

這是使用

<button class="btn btn-danger" id="buy-btn">BOOK NOW</button> 
     <!-- Modal --> 
     <div class="modal fade" id="moreInfo" tabindex="-1" role="dialog" aria-labelledby="moreInfoLabel" aria-hidden="true"> 
     <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" id="moreInfoLabel"><?php echo $package_data['PackageTitle']; ?></h4> 
      </div> 
      <div class="modal-body"> 
     <p>Number of Peaple :<?php echo $tour_data['Visitors']?></p> 
     <p>Itenaries : Elephant Blues, Gallface, Brown Circus, Nelum Tower</p> 
     <p>Method of Travel : Taxi Service</p> 
     <p>Total Time Estimated : 6 Hours</p> 
     <hr> 
     <h4>Terms and Conditions</h4> 
      <p><?php echo $tour_data['TermsAndConditions']; ?></p> 
     </div> 
     <div class="modal-footer"> 
     <button type="button" class="btn btn-primary center-block">Book Now</button> 
     </div> 
     </div><!-- /.modal-content --> 
    </div><!-- /.modal-dialog --> 
    </div><!-- /.modal --> 

回答

1

試試這個代碼:

<button class="btn btn-danger" id="buy-btn" onclick="$('#moreInfo').modal({show: true});">BOOK NOW</button> 
+0

適合您的幫助,但沒有任何結果的變化:( – user2951386

+0

你包括bootstrap.js和對的jquery.js你的html? – yalight

+0

是的,我添加了一些引導和JavaScript.problem是,這段代碼在html中沒有任何問題工作 – user2951386

相關問題