hi folks,i was just getting started to learn about how to have expand and collapse effects, i work on css and html, but i saw collapse and expand effect on few website, so i wanted to learn it. i m just a starter in JavaScript and jQuery, so wanted some advice, where should i start? appreciate anyone who would contribute to my knowledge

Paul_Wilkins
—
2010-07-08T08:55:22Z —
#2

emaarkhan said:

what i need s when a person open my page. all of the Accordions are closed by default

The documentation for the jQuery accordion says that there is an "active" option that can be set to false, which displays none of them at the start.

Here is an example of how it would be used:

$( "#accordion" ).accordion({ active: false });

nofel
—
2010-07-08T07:50:58Z —
#3

Yes i understand Accordion (as i play music myself ) so its open panel opened at a time. i don't want multiple panel opened at same. what i need s when a person open my page. all of the Accordions are closed by default having said that just like a person click one panel to open it, clicking it again should close it. now i am just a starter in jQuery so i know nothing. i was wondering if you can help me modifying the needs i want. thanks

Paul_Wilkins
—
2010-07-08T07:46:37Z —
#4

Will you also be allowing multiple panels open at the same time?

An Accordion is where only 1 panel is open at any time. There are different solutions available depending on whether you'll also allow more than one panel to be open. Will you be restricting things to being only 0 or 1 panel open at any time, or will more be also allowed?

nofel
—
2010-07-06T19:20:57Z —
#5

hey pmw57. as i told i am using the accordion jQuery link you told me. now i am in need of something else. by default one div is opened. i want all div closed on default. how can i modify that?

Paul_Wilkins
—
2010-06-21T08:39:56Z —
#6

They're easy to code and manage. You know best whether accordions or tree vies are more suitable to what you're wanting to achieve. You have links in my previous post to demos about them, along with documentation too, so you can see them, use them, and determine which of the types are more suited for you.

nofel
—
2010-06-21T08:17:12Z —
#7

so as i m starter in jQuery, how do u rate the accordions, as it is fit for what i was looking

Paul_Wilkins
—
2010-06-19T01:11:26Z —
#8

These effects just involve using onclick events to trigger code that shows or hides other parts of the page.

There can be some interesting complexities though, so as you mentioned jQuery, that has [accordions and [url="http://jquery.bassistance.de/treeview/demo/"]treeviews](http://docs.jquery.com/UI/Accordion#overview-example) as good common starting points.