14/14 why is the .accordion opening the 1st section by default


14/14 why is the .accordion opening the 1st section by default

the code is correct but the 1st section show open.

here is the code


any ideas


From the http://api.jqueryui.com/accordion/ docs:


Type: Boolean or Integer
Default: 0
Which panel is currently open.
Multiple types supported:
Boolean: Setting active to false will collapse all panels. This requires the collapsible option to be true.
Integer: The zero-based index of the panel that is active (open). A negative value selects panels going backward from the last panel.
Code examples:
Initialize the accordion with the active option specified:

$( ".selector" ).accordion({
active: 2

So setting active: false maybe would work for you.


Per the docs above,

        collapsible: true,
        active: false


IS not working for me:D


I would like to do this menu, but when I rewrote this code I don't have this animate effect. What should I do on CSS and JQ? Maybe some tutorials on this menu (according)? It would be nice...


Be sure your page is loading jQuery UI, and one of the theme CSS files (smoothing is the old default).

The load sequence should be as follows:

  1. load theme css
  2. load styles.css
  3. load jQuery core
  4. load jQuery UI
  5. load script.js