Accordion is not working


#1


https://www.codecademy.com/courses/jquery-ext/projects/jquery-prj_move-gear


Can somebody please help me with this exercise?

I did precisely as they asked on https://jqueryui.com/accordion/ and everything looks as it is supposed to look, but it doesn't act like an accordion.

So I'm asking myself what I'm doing wrong here. Can somebody tell me?


https://gist.github.com/d7b160660ecf4b5f7fc2c5ece32f9a46


#2

Hi rubenvl i think your problem is here:
$( "#accordion" ).accordion();

you should include the function sentence first just look carefully at jQuery UI accordion widget page there you'll find out like:
$( function() {
$( "#accordion" ).accordion();
} );

Hope i helped!


#3

Hi wloan,

Thank you for your response.

Unfortunately, I already tried that and tried it again just now, but it still doesn't seem to work.

Greets


#4

let me see your code now!


#5

Already solved it. I just had to add the jquey-ui library at the bottom of the html.


#6

This topic was automatically closed 7 days after the last reply. New replies are no longer allowed.