微信公众号搜"智元新知"关注
微信扫一扫可直接关注哦!

打开带有外部链接的手风琴常见问题解答内容

如何解决打开带有外部链接的手风琴常见问题解答内容

我在尝试从我们的主页打开特定内容块到用户将点击的特定问题时遇到问题。我希望它自动打开他们在我们的主页上单击的问题,然后打开常见问题解答页面。我尝试使用锚点,它只是将其移至特定问题,但不显示内容。任何帮助将不胜感激。

    <!-- Begin Accordion Snippet -->
<style>
  .so-tab {
    position: relative;
    width: 100%;
    overflow: hidden;
    margin: 25px 0;
  }
  .so-tab label {
    position: relative;
    display: block;
    padding: 0 25px 0 0;
    margin-bottom: 15px;
    line-height: normal;
    cursor: pointer;
  }
  .so-tab input {
    position: absolute;
    opacity: 0;
    z-index: -1;
  }
  .so-tab-content {
    max-height: 0;
    overflow: hidden;
    transition: max-height .35s;
  }
  /* :checked */
  .so-tab input:checked ~ .so-tab-content {
    max-height: none;
  }
  /* Icon */
  .so-tab label::after {
    position: absolute;
    right: 0;
    top: 0;
    display: block;
    -webkit-transition: all .35s;
    -o-transition: all .35s;
    transition: all .35s;
  }
  .so-tab input[type=checkBox] + label::after {
    content: "+";
  }
  .so-tab input[type=radio] + label::after {
    content: "\25BC";
  }
  .so-tab input[type=checkBox]:checked + label::after {
    transform: rotate(315deg);
  }
  .so-tab input[type=radio]:checked + label::after {
    transform: rotateX(180deg);
  }
</style>

<h2>Section 1 FAQs</h2>
<div class="so-accordion-wrapper">
  <div class="so-tab">
    <input id="so-tab-1" type="checkBox" name="tabs">
    <label for="so-tab-1">What is the best trail camera that sends pictures to your phone?</label>
    <div class="so-tab-content">
     <a name="q1"> <p>The browning Defender Pro Scout cameras are our number one-rated cellular trail camera at the moment. You can choose between the browning Pro Scout AT&amp;T Cellular Trail Camera,or the browning Pro Scout Verizon Cellular Game Trail Camera. These cellular game trail cameras take excellent photos and get great battery life.</p></a>
    </div>
  </div>
  <div class="so-tab">
    <input id="so-tab-2" type="checkBox" name="tabs">
    <label for="so-tab-2">What is the the best motion activated trail camera?</label>
    <div class="so-tab-content">
      <p><a name="q2">The browning Patriot Trail Camera has our top-rated score at this time. This trail game camera takes excellent photos,videos,and gets great battery life. If you are looking for the best motion activated trail camera purchase it with Trailcampro today.</a></p>
    </div>
  </div>
  <div class="so-tab">
    <input id="so-tab-3" type="checkBox" name="tabs">
    <label for="so-tab-3">Are wireless trail cameras worth it?</label>
    <div class="so-tab-content">
      <p><a name="q3">Wireless trail cameras give you the ability to receive photos or videos directly to your phone. Getting real time photos of deer and other wildlife to your phone is invaluable. You can also use wireless trail cameras for security applications.</a></p>
    </div>
  </div>
  <div class="so-tab">
    <input id="so-tab-4" type="checkBox" name="tabs">
    <label for="so-tab-4">What is the best cellular trail camera for the money?</label>
    <div class="so-tab-content">
      <p><a name="q4">The best cellular trail camera for the money is the browning Pro Scout Verizon or the browning Pro Scour AT&amp;T cellular trail game camera. These cellular cameras are $199.95 and take great photos,get great battery life,and are easy to use.</a></p>
    </div>
  </div>
  <div class="so-tab">
    <input id="so-tab-5" type="checkBox" name="tabs">
    <label for="so-tab-5">What is the difference between a game camera and a trail camera?</label>
    <div class="so-tab-content">
      <p><a name="q5">Wildlife cameras are called by a few different names. Some users call them game cameras,trail cameras,scouting cameras,and wildlife cameras. There is really no difference between a game camera and a trail camera. There are many different models of both and they can be called both a game camera,or a trail camera. Read our trail camera and game camera reviews here at Trailcampro to find the best game or trail camera to fit your needs.</a></p>
    </div>
  </div>
  <div class="so-tab">
    <input id="so-tab-6" type="checkBox" name="tabs">
    <label for="so-tab-6">How high off the ground should a trail camera be?</label>
    <div class="so-tab-content">
      <p><a name="q6">There are many different scenarios for setting up trail cameras. There is not one particular way that it has to be done. However,as a rule of thumb we recommend mounting trail cameras about waist high. This usually works for most settings like placing a game camera on a trail,or maybe watching a Feeder.</a></p>
      
    </div>
  </div>

  <div class="so-tab">
    <input id="so-tab-7" type="checkBox" name="tabs">
    <label for="so-tab-7">What is the best trail camera for home security?</label>
    <div class="so-tab-content">
      <p><a name="q7">There are many different trail cameras you can use for security. Some of them will have the ability to send photos to your phone using a cellular connection through Verizon or AT&amp;T. On of our top picks for a cellular security camera is going to be the Ridgetec Lookout. If you are looking for a cellular trail camera for home security one of our top-picks is going to be the here. If you don't have a cellular signal where you are wanting to place the security trail camera. The Reconyx Hyperfire 2 Security may be a good option for you.</a></p>
    </div>
  </div>
  <div class="so-tab">
    <input id="so-tab-8" type="checkBox" name="tabs">
    <label for="so-tab-8">How much does a cellular trail camera plan cost?</label>
    <div class="so-tab-content">
      <p><a name="q8">When choosing a cellular trail camera the cost of the plans can be important. Spypoint seems to offer the best monthly and yearly plans especially if you are wanting an unlimited plan. Most cameras are going to start around $10 a month and that is going to get you a set number of photos per month or a specific amount of data per month. To check out all the cellular cameras and their plans click here and choose which cellular game camera you want to look at.</a></p>
    </div>
  </div>
  <div class="so-tab">
    <input id="so-tab-9" type="checkBox" name="tabs">
    <label for="so-tab-9">How do I view my trail camera pictures on my phone?</label>
    <div class="so-tab-content">
      <p><a name="q9">Almost everyone has a smart phone these days and you can use them to view your trail camera photos. Typically when you have a iPhone the best thing to purchase is going to be an iPhone SD card reader. You would want to purchase one made by Apple as we have seen issues with other brands. If you have an Android device you Could use the Stealth Cam 4-IN-1 reader. It seems to work well with Android phones but has issues with iPhones.</a></p>
    </div>
  </div>
  </div>

解决方法

如果您同意为此使用 JavaScript,则可以使用 <HTMLElement>.click()

如果您在点击 FAQ 位时传递了查询参数(例如 ?faqclick=specificquestion),则可以使用 .click()。如果您需要有关从客户端获取查询参数的信息,请使用此帖子:How to get parameters on client side passsed by HTTP GET request?

.click() 的一个例子是 document.querySelector("#myUniqueQuestion").click()

版权声明:本文内容由互联网用户自发贡献,该文观点与技术仅代表作者本人。本站仅提供信息存储空间服务,不拥有所有权,不承担相关法律责任。如发现本站有涉嫌侵权/违法违规的内容, 请发送邮件至 dio@foxmail.com 举报,一经查实,本站将立刻删除。