I am trying to open an accordion based on a link i send to the page
This is my url
services.html#branding
I am using the following code in the head:
<script type="text/javascript">
$(document).ready(function(){
$('#accordion').accordion({collapsible: true, animated: 'slide', autoHeight: false, navigation: true, active : 'false'});
});
</script>
And the accordion looks like:
<div id="accordion">
<h3 id="branding"><a href="#">Branding</a></h3>
<div>
<p>Does your business have a</p>
</div>
<h3><a href="#print">Print</a></h3>
<div>
<p>Brochures</a></p>
</div>
</div>
Any help would be greatly appreciated…
http://docs.jquery.com/UI/Accordion
Oh I see Jeff reported that the current UI version is broken, but I actually had a solution using the current version…
HTML
Script
I used
a[href$=...]originally, but changed it toa[href*=...]… either will workUpdate: the
navigationoption was removed from jQuery UI 1.10.0, so use this method:CSS
Script