jQuery accordion expanded
Posted
by
hajder
on Stack Overflow
See other posts from Stack Overflow
or by hajder
Published on 2012-06-24T08:08:26Z
Indexed on
2012/06/24
9:15 UTC
Read the original article
Hit count: 127
jQuery
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.
© Stack Overflow or respective owner