On Thu, Dec 17, 2009 at 11:57 PM, speedy33417 <speedy33...@yahoo.com> wrote:
> > I'm new to jQuery and I have a very basic and easy question. > > I'm trying to use the accordion on my website. I've already created the > page > and have the layout done. > > What I'm trying to do is shown on the demo page: jQuery UI Demo -> > Accordion > -> Collapse Content. > I need all my accordions to be collapsible but by default it's set to one > always being expanded. > > On the demo page it says that this can be achived by setting the > collapsible > option to true. > > How do I do that? Is it done in my html code, or the js code, or the css > code? What is the actual script and where do I paste it? > If you want to do it for one accordion, you can do it on init: $('#accordion').accordion({ collapsible: true, active: false }); demo: http://jsbin.com/ekiro3 source: http://jsbin.com/ekiro3/edit If you want to change the defaults so all accordions initialize collapsible and without an active section, extend the defaults before init: $.extend($.ui.accordion.defaults, { collapsible: true, active: false }); $('#accordion1').accordion(); $('#accordion2').accordion(); $('#accordion3').accordion(); - Richard -- You received this message because you are subscribed to the Google Groups "jQuery UI" group. To post to this group, send email to jquery...@googlegroups.com. To unsubscribe from this group, send email to jquery-ui+unsubscr...@googlegroups.com. For more options, visit this group at http://groups.google.com/group/jquery-ui?hl=en.