0
我想將我的頁腳常見問題解答問題鏈接到另一頁上的特定手風琴面板。所以基本上我只是想讓我的頁腳faq鏈接打開它在faq頁面上綁定的問題。Divi主題集成jQuery手風琴外部鏈接
HTML(頁腳鏈接):
<div class="footer-faq">
<a id="faq-link-1" href="http://accesshealth.lunabyte.io/faqs/#my
accordion">What is Access
Health?</a><br />
<a id="faq-link-2" href="http://accesshealth.lunabyte.io/faqs/#my-
accordion">Who are the Access Health clinicians?</a><br />
<a id="faq-link-3"
onclick="thing2();"href="http://accesshealth.lunabyte.io/faqs/#my-
accordion"> Does it matter where my insurance cover is?</a><br />
<a id="faq-link-4" onclick="thing3();"
href="http://accesshealth.lunabyte.io/faqs/#my-accordion"> Who can be
treated at Access Health?</a><br />
<a id="faq-link-5" onclick="thing4();"
href="http://accesshealth.lunabyte.io/faqs/#my-accordion"> Which conditions
are treated at Access Health?</a><br />
<a id="faq-link-6" onclick="thing5();"
href="http://accesshealth.lunabyte.io/faqs/#my-accordion"> What preventative
services are provided?</a><br />
<a id="view-all" href="http://accesshealth.lunabyte.io/faqs/">View All</a>
</div>
所以,當我點擊這些鏈接,它只能打開手風琴第二面板。所以它在一定程度上工作,但每個鏈接只打開第二個面板。
這裏是jQuery的:
<script>
jQuery(function thing($){
$(window).load(function(){
if(window.location.hash) {
$('.et_pb_accordion_item_0 .et_pb_toggle_title').click();
}
});
});
jQuery(function thing1($){
$(window).load(function(){
if(window.location.hash) {
$('.et_pb_accordion_item_1 .et_pb_toggle_title').click();
}
});
});
jQuery(function thing2($){
$(window).load(function(){
var et_hash = window.location.hash;
if(window.location.hash) {
$('.et_pb_accordion_item_2 .et_pb_toggle_title').click();
}
});
});
jQuery(function thing3($){
$(window).load(function(){
var et_hash = window.location.hash;
if(window.location.hash) {
$('.et_pb_accordion_item_3 .et_pb_toggle_title').click();
}
});
});
jQuery(function thing4($){
$(window).load(function(){
var et_hash = window.location.hash;
if(window.location.hash) {
$('.et_pb_accordion_item_4 .et_pb_toggle_title').click();
}
});
});
jQuery(function thing5($){
$(window).load(function(){
var et_hash = window.location.hash;
if(window.location.hash) {
$('.et_pb_accordion_item_5 .et_pb_toggle_title').click();
}
});
});
</script>
還是,做同樣的事情。 – JontheNerd