?
Solved

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

Posted on 2013-10-25
3
Medium Priority
?
269 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
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 2
3 Comments
 
LVL 54

Accepted Solution

by:
Scott Fell,  EE MVE earned 2000 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 54

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

Free Tool: Site Down Detector

Helpful to verify reports of your own downtime, or to double check a downed website you are trying to access.

One of a set of tools we are providing to everyone as a way of saying thank you for being a part of the community.

Question has a verified solution.

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

Introduction HyperText Transfer Protocol (http://www.ietf.org/rfc/rfc2616.txt) or "HTTP" is the underpinning of internet communication.  As a teacher of web development I have heard many questions, mostly from my younger students who have come to t…
Introduction If you're like most people, you have occasionally made a typographical error when you're entering information into an online form.  And to your consternation, the browser remembers the error, and offers to autocomplete your future entr…
The viewer will learn how to dynamically set the form action using jQuery.
The viewer will learn the basics of jQuery, including how to invoke it on a web page. 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.: (CODE)

650 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