I\'m using twitter-Bootstrap 2.04, and I\'m using the latest jQuery. I\'m trying to make a link that will go from one page to the page containing this accordion, and then ac
You can use the position of the accordion section. The following link opens the third accordion section on a twitter bootstrap (wordpress) accordion.
Link Example: http://www.zfp-bauwesen.de/leistungen/ubersicht#3
Javscript Code:
$( document ).ready(function() {
if (window.location.hash) {
var AccordionSectionNumber = window.location.hash.substring(1);
AccordionBodyID = $(".accordion .accordion-group:nth-of-type(" + AccordionSectionNumber + ") .accordion-heading a").attr('href')
if (! (typeof AccordionBodyID === "undefined")) {
$(AccordionBodyID).collapse('show');
return true;
}
}
});