Solved

JQuery UI - Accordion (Easy question...i hope)

Posted on 2013-10-25
3
264 Views
Last Modified: 2013-10-25
http://jqueryui.com/accordion/

is there a way to have it collapsed 100% on the page load?  Right now, by default, it seems to keep one open.

Here's what I have now.

      <script>
          $(function () {
              $("#accordion").accordion({
                  heightStyle: "content",
                  collapsible: true
              });
          });
  </script>

Open in new window

0
Comment
Question by:patriotpacer
  • 2
3 Comments
 
LVL 52

Accepted Solution

by:
Scott Fell,  EE MVE earned 500 total points
ID: 39601017
Add  active: false

$(function() {
    $( "#accordion" ).accordion({
       heightStyle: "content",
      collapsible: true,
         active: false
    });
    
  });

Open in new window

http://jsbin.com/uPIWoLe/2/
0
 

Author Closing Comment

by:patriotpacer
ID: 39601048
Thanks!
0
 
LVL 52

Expert Comment

by:Scott Fell, EE MVE
ID: 39601217
Your welcome.  you are right, this should be easier but the jquery documentation is not always intuitive in my opinion at least when you are learning.
0

Featured Post

Webinar: Aligning, Automating, Winning

Join Dan Russo, Senior Manager of Operations Intelligence, for an in-depth discussion on how Dealertrack, leading provider of integrated digital solutions for the automotive industry, transformed their DevOps processes to increase collaboration and move with greater velocity.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

by Julian Matz As of jQuery (http://jquery.com/) 1.4 the .live() method (http://api.jquery.com/live/) supports custom events as well as some standard JavaScript events that it previously didn't support. Among these is the submit event. Unlike …
Hi all! Recently there was EE question and the person wanted to have a multi-column textbox <div> selection, so as a first step to answer I provided a link but that was not complete with JavaScript selection, but had a good style sheet. So as a ques…
The viewer will learn how to dynamically set the form action using jQuery.
The viewer will learn the basics of jQuery including how to code hide show and toggles. Reference your jQuery libraries: (CODE) Include your new external js/jQuery file: (CODE) Write your first lines of code to setup your site for jQuery…

807 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question