Bootstrap数据切换不适用于移动设备

时间:2017-12-11 05:10:24

标签: twitter-bootstrap twitter-bootstrap-3

我正在尝试在桌面浏览器上运行时完成类似于代码示例的数据切换。

此代码的问题在于它无法在移动设备上运行。例如:三星(s6,s7)和Apple(Iphone 6s和7s)

<div class="row">
        <div class="faq">   
            <div class="container">
                <div class="col-md-12">
                    <h1>FREQUENTLY ASKED QUESTIONS</h1>
                </div>
                <table class="table">
                    <thead>
                        <th>General</th>
                    </thead>

                    <tbody>
                        <tr data-toggle="collapse" data-target="#faq6" class="clickable faq-header">
                            <td>What are your hours of operation?
                            </td>
                        </tr>
                        <tr>
                            <td colspan="3">
                                <div id="faq6" class="collapse">
                                    Lorem Ipsum is simply dummy text of the printing and typesetting industry. Lorem Ipsum has been the industry's standard dummy text ever since the 1500s, when an unknown printer took a galley of type and scrambled it to make a type specimen book.
                                </div>
                            </td>
                        </tr>

                        <tr data-toggle="collapse" data-target="#faq7" class="clickable faq-header">
                            <td>What is the minimum storage period?
                            </td>
                        </tr>
                        <tr>
                            <td colspan="3">
                                <div id="faq7" class="collapse">
                                    You can store as short as three months. But the longer you store the more money you will save!
                                </div>
                            </td>
                        </tr>
                    </tbody>
                </table>
            </div>
        </div>
     </div>

我希望它与浏览器一样,当您点击它将触发的问题并显示相应的答案时。

我目前获得的实际结果是它不响应任何触摸/点击。我的菜单下拉列表有效,但数据切换似乎没有响应。

我试过这些答案: The data-toggle attributes in Twitter Bootstrap / Bootstrap3 accordion table not working on IOS mobile / Bootstrap data-toggle not working in Safari / 但似乎没有一个似乎对我有用

1 个答案:

答案 0 :(得分:1)

尝试将href="#"添加到<a标记中,该标记实际上未显示在您的问题中。那为我解决了。