How to link to a specific item in an Accordion
Hi everyone,
I am new to jQuery and I am trying to open a specific item in an accordion based on the URL. For example,
http://www.example.com/accordion.php#id32
would open the matching item (with ID 32) in the accordion.
Here are the settings for my Accordion:
-
$("#accordion").accordion({
autoHeight: false,
collapsible: true,
navigation: true,
active: false
});
Then, for each item:
-
<div id="accordion">
<h3><a href="#id32">Example ID 32</a></h3>
<div>
<p>Testing - Example ID 32</p>
</div>
<h3> <a href="#id33">Example ID 33</a></h3>
<div>
<p>Testing Again - Example ID 33</p>
</div>
</div>
... and so on. Links that I want to point to a specific entry are as follows:
-
<a href="http://www.example.com/accordion.php#id33">Go to Example 33</a>
When I click the link, it takes me to the page but it does not activate that entry. Based on the vague description of "location: true" in the doccumentation, jQuery is supposed to activate an item based on an anchor? Am I missing something?
Any help here would be GREATLY appreciated.
Thanks
Ben