jQuery accordion expanded
- by hajder
I am trying to create an accordion with jQuery from this example
http://docs.jquery.com/UI/Accordion
The markup is the same, i.e.
<div id="accordion">
<h3><a href="#">First header</a></h3>
<div>First content</div>
<h3><a href="#">Second header</a></h3>
<div>Second content</div>
</div>
And I have script file enqueued correctly, which has the following content:
$ = jQuery;
$(document).ready(function() {
$("#accordion").accordion();
});
But I get this error in the console output
TypeError: 'undefined' is not a function (evaluating '$("#accordion").accordion()')
The result being all divs are expanded, i.e not clickable.