logo-dw

Go Back   Dreamweaver Club Forums > Dreamweaver forums > Spry
Register FAQ Members List Search Today's Posts Mark Forums Read

Reply
 
Thread Tools Display Modes
Old 05-22-2009, 12:09 PM   #1
dubaco
 
Join Date: Jul 2008
Posts: 98
Default Accordion default to "closed"

Is it possible to set the default state of Accordion to be closed so all panels are closed?
Or do I have to accept that this feature appears as open when first loaded?
Many thanks
d
dubaco is offline   Reply With Quote
Old 05-22-2009, 02:02 PM   #2
lobwl
 
Join Date: May 2009
Posts: 6
Default

It is possible yes, I have just done this with a website I am making.

You need to make sure the following code is at the bottom of body of your page.

Code:
 
<script type="text/javascript">
<!--
 
var Accordion1 = new Spry.Widget.Accordion("Accordion1", { useFixedPanelHeights: false, defaultPanel: -1 });
 
//-->
</script>
Assuming your Accordion is called Accordion1, otherwise change this value. Particularly notice that useFixedPanelHeights is set to false and then the defaultPanel is -1 and all should be sorted!

Will
lobwl is offline   Reply With Quote
Old 05-22-2009, 02:55 PM   #3
dubaco
 
Join Date: Jul 2008
Posts: 98
Default

Thankyou, you are a star!!

Another example of what a great resource this forum is.

Why can't the adobe website be so clear and concise?

d
dubaco is offline   Reply With Quote
Old 05-22-2009, 03:24 PM   #4
Corrosive
Corrosive's Avatar
 
Join Date: Feb 2008
Location: Bristol, England
Posts: 7,103
Default

Quote:
Originally Posted by dubaco View Post
Thankyou, you are a star!!

Another example of what a great resource this forum is.

Why can't the adobe website be so clear and concise?

d
Because the Adobe forum isn't run by monkeys with hand grenades like this one...darn it...I've said too much again
Corrosive is offline   Reply With Quote
Old 05-22-2009, 03:33 PM   #5
lobwl
 
Join Date: May 2009
Posts: 6
Default

Quote:
Originally Posted by dubaco View Post
Thankyou, you are a star!!

Another example of what a great resource this forum is.

Why can't the adobe website be so clear and concise?

d
Well I came across this forum looking for help myself, but I'm glad I could help you out!

Will
lobwl is offline   Reply With Quote
Old 09-24-2009, 06:03 AM   #6
chrissia7890
 
Join Date: Jul 2009
Posts: 29
Default

Hi, this site is good as adobe does not provide much information on things that we normally see in the web.

I am happy to find the above information that i needed for my web.

I do need some advise here since i started with the accordion. i have different height content. i realise that if i were to open one with a lesser content and than follow by another one with a different height. it does not open fully. it actually follows the previous one of a shorter height.

but if i were to close and open again. i manage to see the fully content.

Any suggestion?
chrissia7890 is offline   Reply With Quote
Old 09-24-2009, 02:55 PM   #7
chrissia7890
 
Join Date: Jul 2009
Posts: 29
Smile

I manage to resolve the problem. so please treat this as closed. Thank you all.
chrissia7890 is offline   Reply With Quote
Old 09-24-2009, 07:32 PM   #8
DWcourse
DWcourse's Avatar
 
Join Date: Apr 2009
Posts: 3,276
Default

You could share your solution with the rest of the forum.
__________________
If my answer helped, check out DWcourse.com for Dreamweaver tips and tutorials.
DWcourse is offline   Reply With Quote
Old 09-28-2009, 01:57 PM   #9
chrissia7890
 
Join Date: Jul 2009
Posts: 29
Default

Sure,

I mistake the message from lobwl. he mentioned add this

<script type="text/javascript">
<!--

var Accordion1 = new Spry.Widget.Accordion("Accordion1", { useFixedPanelHeights: false, defaultPanel: -1 });

//-->
</script>

So i did but it flicker before opening. what he actually mean was to add { useFixedPanelHeights: false, defaultPanel: -1 } in the end of the body.
chrissia7890 is offline   Reply With Quote
Old 09-03-2011, 03:11 PM   #10
veera_ramesh
 
Join Date: Sep 2011
Posts: 1
Default

ya working thanks
veera_ramesh is offline   Reply With Quote
Reply


Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT. The time now is 09:18 AM.


Powered by vBulletin® Version 3.8.7
Copyright ©2000 - 2017, vBulletin Solutions, Inc.
Copyright 2006 DreamweaverClub.com