【问题标题】:Dropdown links open and close and open again下拉链接打开和关闭并再次打开
【发布时间】:2018-07-02 12:55:40
【问题描述】:

我有一个 bootstrap 手风琴,当我单击一个面板标题打开它时,它不仅仅是保持打开状态,而是打开然后关闭并再次打开。页面顶部的汉堡菜单按钮(在小屏幕上)也发生了同样的事情。

这里是 HTML。我真的不知道 javascript - 我只是使用了 bootstrap 的插件。这是引导程序的 javascript 文件:

<script src="https://maxcdn.bootstrapcdn.com/bootstrap/4.0.0-beta.3/js/bootstrap.min.js" integrity="sha384-a5N7Y/aK3qNeh15eJKGWxsqtnX/wWdSZSKp+81YjTmS15nvnvxKHuzaWwXHDli+4" crossorigin="anonymous"></script>

<div class="panel-group my-3" id="accordion1">
          <div class="panel panel-default">
            <div class="panel-heading">
              <h5 class="panel-title"><a data-toggle="collapse" data-parent="#accordion1" href="#collapseOne1"><span class="question">&nbsp;</span>&nbsp; What is TorahMates?</a></h5>
            </div>
            <div id="collapseOne1" class="panel-collapse collapse in">
              <div class="panel-body">Typically, TorahMates study once a week for 30-60 minutes. There’s not usually any preparation necessary, especially if you’re using a text. Just be ready at your scheduled, agreed upon time to participate in an engaging discussion on the topic you choose! </div>
            </div>
          </div>
          <div class="panel panel-default">
            <div class="panel-heading">
              <h5 class="panel-title"><a data-toggle="collapse" data-parent="#accordion1" href="#collapseTwo1"><span class="question">&nbsp;</span>&nbsp;  Who is TorahMates for?</a></h5>
            </div>
            <div id="collapseTwo1" class="panel-collapse collapse">
              <div class="panel-body">TorahMates is a great program for pretty much anyone Jewish, even if you don’t know anything about Judaism. We set up more knowledgeable volunteer mentors with “students” with less background. Usually, both partners find they gain tremendously from their study together. </div>
            </div>
          </div>
          <div class="panel panel-default">
            <div class="panel-heading">
              <h5 class="panel-title"><a data-toggle="collapse" data-parent="#accordion1" href="#collapseThree1"><span class="question">&nbsp;</span>&nbsp;  What topics can I study?</a></h5>
            </div>
            <div id="collapseThree1" class="panel-collapse collapse">
              <div class="panel-body"> It’s up to you! You can study any topic that interests you, as long as it has something to do with Judaism, Torah, Jewish law or faith, Jewish History, Hebrew, prayers... you get the idea. </div>
            </div>
          </div>
          <div class="panel panel-default">
            <div class="panel-heading">
              <h5 class="panel-title"><a data-toggle="collapse" data-parent="#accordion1" href="#collapseFour1"><span class="question">&nbsp;</span>&nbsp;  How will you choose my partner?</a></h5>
            </div>
            <div id="collapseFour1" class="panel-collapse collapse">
              <div class="panel-body">We have a large database of men and women who’ve signed up that we’ll use to find the perfect match for you. Some of the things we look for are common interests, ages, and cultural backgrounds. Often, these partnerships develop into far more than routine study sessions. Many of our TorahMates are now close friends too!</div>
            </div>
          </div>
          <div class="panel panel-default">
            <div class="panel-heading">
              <h5 class="panel-title"><a data-toggle="collapse" data-parent="#accordion1" href="#collapseFive1"><span class="question">&nbsp;</span> &nbsp; How do TorahMates go about studying?</a></h5>
            </div>
            <div id="collapseFive1" class="panel-collapse collapse">
              <div class="panel-body">Most TorahMates study over the phone but FaceTime or the like is also a great option. Where possible, some TorahMates even study in person. </div>
            </div>
          </div>
          <div class="panel panel-default">
            <div class="panel-heading">
              <h5 class="panel-title"><a data-toggle="collapse" data-parent="#accordion1" href="#collapseSix1"><span class="question">&nbsp;</span>&nbsp;  Will you supply the books/study text or do I need to get my own?</a></h5>
            </div>
            <div id="collapseSix1" class="panel-collapse collapse">
              <div class="panel-body">Once you’ve decided what topic you want to learn, your TorahMates coordinator will suggest various titles and authors to support that topic. Not everyone learns from a text, but many do. We’ll supply each of you with one free book per year of learning.</div>
            </div>
          </div>

          <div class="panel panel-default">
            <div class="panel-heading">
              <h5 class="panel-title"><a data-toggle="collapse" data-parent="#accordion1" href="#collapseEight1"><span class="question">&nbsp;</span>&nbsp;  What happens if my partnership is not working out?</a></h5>
            </div>
            <div id="collapseEight1" class="panel-collapse collapse">
              <div class="panel-body">Your coordinator will work with both partners to smooth out any issues that may arise. If nothing can be worked out or if it’s just not a match, we can find new partners for each TorahMate.</div>
            </div>
          </div>
          <div class="panel panel-default">
            <div class="panel-heading">
              <h5 class="panel-title"><a data-toggle="collapse" data-parent="#accordion1" href="#collapseNine1"><span class="question">&nbsp;</span>&nbsp;  What is the mileage program? How do I log in to it?</a></h5>
            </div>
            <div id="collapseNine1" class="panel-collapse collapse">
              <div class="panel-body">The mileage program is a nice perk through which TorahMates can earn <a href="/mileage/peekPrizes.asp" target="_blank">great prizes</a> by logging in their sessions by date and number of minutes learned. You can log in online, by phone or by text. Your TorahMates coordinator can show you how. </div>
            </div>
          </div>
      </div>

这是页面的链接: http://torahmates.org/junior/index.php#faq

有什么想法吗?

【问题讨论】:

  • 请提供您的 JavaScript 和 HTML 代码。
  • 我们不调试实时站点。在此处发布相关代码。
  • 请提供您的 HTML 和 JS 代码。
  • 我在上面编辑了我的帖子。

标签: javascript html


【解决方案1】:

原来我有一个包含文件,其中在页面上运行了重复的脚本,这导致了问题。

【讨论】:

    猜你喜欢
    • 1970-01-01
    • 1970-01-01
    • 2023-04-03
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 2012-11-13
    • 2020-04-28
    • 1970-01-01
    相关资源
    最近更新 更多