引导程序 accordion 选项卡没有打开和关闭

qvsjd97n  于 2021-07-24  发布在  Java
关注(0)|答案(0)|浏览(209)

不知道为什么我的引导卡没有打开和关闭。内容从数据库加载良好,当我在代码中手动打开它们时,内容就在那里。有人有什么建议吗?

<div class='panel-heading' role='tab' id='heading'>

      <!-- Accordion card -->
            <div class="accordion md-accordion" id="accordion" role="tablist" aria-multiselectable="true"> 
            <div class="panel panel-success" id="collapse_container">
            <?php  
            while($row = mysqli_fetch_assoc($result))  
            {  
            ?>  
            <div class="card" id="accordion" role="tablist"  aria-multiselectable="true">  

                    <!-- Card Header -->
                    <div class="card-header" role="tab">      
                      <a data-toggle="collapse" href="<?php echo $row["id"]; ?>"  data-parent="#accordion"><h4 class="mb-0"> <?php echo $row["question"]; ?></h4></a>  

                    </div>  

                      <!-- Card Body -->
                    <div id="<?php echo $row["id"]; ?>" class="collapse" role="tabpanel aria-labelledby="headingOne">
                      <div class="card-body">  
                        <?php echo $row["answer"]; ?>  
                      </div>  
                    </div>  
                 </div>  
            <?php  
            }  
            ?>  
            </div>  
        </div>
    </div>

暂无答案!

目前还没有任何答案,快来回答吧!

相关问题