Susie Posted February 2, 2010 Report Share Posted February 2, 2010 I am using this accordion: http://jqueryui.com/demos/accordion/#collapsible . It's working great except I'm not sure how to make it so that when you visit the page, all the items are closed until you select one to open. I don't want the first item to be open by default. Any ideas? :/ Quote Link to comment Share on other sites More sharing options...
PicnicTutorials Posted February 2, 2010 Report Share Posted February 2, 2010 Hello, that site says... By default, accordions always keep one section open. To allow for all sections to be be collapsible, set the collapsible option to true. Click on the currently open section to collapse its content pane. Quote Link to comment Share on other sites More sharing options...
Susie Posted February 2, 2010 Author Report Share Posted February 2, 2010 Thanks, Eric. Yes, I saw that and here's what I have in the : $(function() { $("#accordion").accordion({ collapsible: true }); }); The result is the first item is open by default. I want them all closed by default. For reference, here's what I'm working on (will style the accordion once I get it working properly): http://tinyurl.com/ylefxty Quote Link to comment Share on other sites More sharing options...
monkeysaurus Posted February 2, 2010 Report Share Posted February 2, 2010 Susie, I think you're looking for: Quote Link to comment Share on other sites More sharing options...
Susie Posted February 2, 2010 Author Report Share Posted February 2, 2010 Oh, awesome! I totally missed that. Thanks!!! :cool: Quote Link to comment Share on other sites More sharing options...
Susie Posted February 3, 2010 Author Report Share Posted February 3, 2010 I have another question about this accordion. I can see that the little arrow icon is being added through the jquery ui css framework (http://jqueryui.com/docs/Theming/API), but I have no idea how to apply it to my accordion. Is anyone here familiar with this? Quote Link to comment Share on other sites More sharing options...
monkeysaurus Posted February 3, 2010 Report Share Posted February 3, 2010 I've always used Themeroller in conjunction with jQuery UI - you can tweak the look in your browser, then download the specific package you need. There are pre-rolled themes there too. Once you've done this, it's a simple case of including the stylesheet in your page and making sure the paths are correct. Even if you use themeroller as a starting point, then tweak once it's in place, it's the quickest way to work with jQuery UI, for my money. Quote Link to comment Share on other sites More sharing options...
Susie Posted February 5, 2010 Author Report Share Posted February 5, 2010 Thanks so much for the info. I get it now! :cool: Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.