bootstrap手风琴在自定义opencart主题的结帐页面中不起作用

时间:2015-11-25 06:13:14

标签: javascript php opencart opencart2.x

我正在开发自定义主题的opencart项目。 现在问题是在结账页面bootstrap手风琴没有打开下一个面板onclick的继续按钮。 所以请帮我找出错误的位置。

checkout.tpl的代码

    <div id="page">
      <div id="winkelmand" style="padding-top:50px;">
      <div id="winkelmand-content">
         <div id="winkelmand-producten" style="height:auto !important;padding:10px;">
            <ul class="breadcrumb">
               <?php foreach ($breadcrumbs as $breadcrumb) { ?>
               <li><a href="<?php echo $breadcrumb['href']; ?>"><?php echo $breadcrumb['text']; ?></a></li>
               <?php } ?>
            </ul>
            <h1><?php echo $heading_title; ?></h1>
      <div class="panel-group" id="accordion">
        <div class="panel panel-default">
          <div class="panel-heading">
            <h4 class="panel-title"><?php echo $text_checkout_option; ?></h4>
          </div>
          <div class="panel-collapse collapse" id="collapse-checkout-option">
            <div class="panel-body"></div>
          </div>
        </div>
        <div class="panel panel-default">
          <div class="panel-heading">
            <h4 class="panel-title"><?php echo $text_checkout_payment_address; ?></h4>
          </div>
          <div class="panel-collapse collapse" id="collapse-payment-address">
            <div class="panel-body"></div>
          </div>
        </div>

        <?php if ($shipping_required) { ?>
        <div class="panel panel-default">
          <div class="panel-heading">
            <h4 class="panel-title"><?php echo $text_checkout_shipping_address; ?></h4>
          </div>
          <div class="panel-collapse collapse" id="collapse-shipping-address">
            <div class="panel-body"></div>
          </div>
        </div>
        <div class="panel panel-default">
          <div class="panel-heading">
            <h4 class="panel-title"><?php echo $text_checkout_shipping_method; ?></h4>
          </div>
          <div class="panel-collapse collapse" id="collapse-shipping-method">
            <div class="panel-body"></div>
          </div>
        </div>
        <?php } ?>
        <div class="panel panel-default">
          <div class="panel-heading">
            <h4 class="panel-title"><?php echo $text_checkout_payment_method; ?></h4>
          </div>
          <div class="panel-collapse collapse" id="collapse-payment-method">
            <div class="panel-body"></div>
          </div>
        </div>
        <div class="panel panel-default">
          <div class="panel-heading">
            <h4 class="panel-title"><?php echo $text_checkout_confirm; ?></h4>
          </div>
          <div class="panel-collapse collapse" id="collapse-checkout-confirm">
            <div class="panel-body"></div>
          </div>
        </div>
      </div>
         </div>
      </div>
   </div>
</div>

我已将javascript代码粘贴到jsfiddle,但只是显示目的。它不起作用,因为手风琴中的数据来自数据库。

https://jsfiddle.net/dipeshsoni/96aLv9js/

1 个答案:

答案 0 :(得分:1)

我今天遇到类似的问题,我用css来解决它。

.collapse.in { display: block!important; } .collapse { display: none!important; }

希望这会对某人有所帮助。