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 03-02-2012, 12:49 PM   #1
glassonion
glassonion's Avatar
 
Join Date: Mar 2012
Posts: 13
Arrow Spry Accordian Question - variable height for content and tabs closed to start

Hi All,

I'm a newbie to Dreamweaver, but I am enjoying learning it very much. I know this is a basic question, but I'm not finding anything specific online that will work for me.

I have a template built for pages where I wish to use a spry accordion menu in the main content area. I would like the page to open with all the tabs closed. Once the tabs are clicked I'd like the content area to vary depending on the amount of text. Right now, it seems to be a fixed height (some things are cut off and others have way too much blank space at the bottom.

I've come across some answers to this where you change the code to something like:

<script type="text/javascript"> var acc1 = new Spry.Widget.Accordion("Acc1", { useFixedPanelHeights: false, defaultPanel: -1 }); </script>

Since I'm new to this I'm not sure how to customize this or name it properly so it works on my page. My code currently looks like this:

<script src="../SpryAssets/SpryAccordion.js" type="text/javascript"></script>
<link href="../SpryAssets/SpryAccordion.css" rel="stylesheet" type="text/css" />

Thanks for looking!
glassonion is offline   Reply With Quote
Old 03-04-2012, 12:07 PM   #2
gentleone
gentleone's Avatar
 
Join Date: Nov 2009
Location: Rhodes, Greece
Posts: 2,837
Default

Hi glassonion,

That little piece of javascript that you've found should be altered somewhere underneath the HTML of that accordion (if I'm right). Do you have this somewhere online so that we can have a look? If not, post all the HTML of that page here in the thread.
__________________
www.gentlemedia.nl
gentleone is offline   Reply With Quote
Old 03-04-2012, 04:36 PM   #3
glassonion
glassonion's Avatar
 
Join Date: Mar 2012
Posts: 13
Default

Quote:
Originally Posted by gentleone View Post
Hi glassonion,

That little piece of javascript that you've found should be altered somewhere underneath the HTML of that accordion (if I'm right). Do you have this somewhere online so that we can have a look? If not, post all the HTML of that page here in the thread.
Hi gentleone,

Thanks for taking the time to answer o newb. I made a few changes this morning with some advice I was given on adobe, but I'm still having an issue. I created a template first and this page is from the template. Hopefully, if I did this right you can check out the page here

Thanks again!
glassonion is offline   Reply With Quote
Old 03-04-2012, 06:21 PM   #4
gentleone
gentleone's Avatar
 
Join Date: Nov 2009
Location: Rhodes, Greece
Posts: 2,837
Default

If you go into code view you'll see at line 405 this:
HTML Code:
  <script type="text/javascript">
var Accordion1 = new Spry.Widget.Accordion("Accordion1");
  </script>
Replace that piece of javascript with this:
HTML Code:
  <script type="text/javascript">
var Accordion1 = new Spry.Widget.Accordion("Accordion1", { useFixedPanelHeights: false, defaultPanel: -1 });
  </script>
That'll do.
__________________
www.gentlemedia.nl
gentleone is offline   Reply With Quote
Old 03-04-2012, 08:04 PM   #5
glassonion
glassonion's Avatar
 
Join Date: Mar 2012
Posts: 13
Default

Excellent! Thanks so much!
glassonion is offline   Reply With Quote
Old 03-04-2012, 08:43 PM   #6
glassonion
glassonion's Avatar
 
Join Date: Mar 2012
Posts: 13
Default

It works perfect in Dreamweaver and on ie, but the panels no longer open in firefox though the content text shows superimposed over the other menus, etc.

Last edited by glassonion; 03-04-2012 at 08:58 PM..
glassonion is offline   Reply With Quote
Old 03-05-2012, 05:53 AM   #7
glassonion
glassonion's Avatar
 
Join Date: Mar 2012
Posts: 13
Default

Nevermind that last question, gentleone. I was able to get it working in firefox. Thanks again for everything - much appreciated.
glassonion is offline   Reply With Quote
Old 03-05-2012, 02:39 PM   #8
gentleone
gentleone's Avatar
 
Join Date: Nov 2009
Location: Rhodes, Greece
Posts: 2,837
Default

No props... your welcome! And good that you sortied out the Firefox issue. Can you explain briefly what you did to solve it in case someone else runs into the same problem?
__________________
www.gentlemedia.nl
gentleone is offline   Reply With Quote
Old 03-05-2012, 03:20 PM   #9
glassonion
glassonion's Avatar
 
Join Date: Mar 2012
Posts: 13
Default

Quote:
Originally Posted by gentleone View Post
No props... your welcome! And good that you sortied out the Firefox issue. Can you explain briefly what you did to solve it in case someone else runs into the same problem?
Sure, I'm not 100% sure why this worked. But in the rule for AccordionPanelContent, under the positioning tab I switched visibility to visible (it was blank) and I set overflow to auto (it was set to visible).
glassonion is offline   Reply With Quote
Old 03-05-2012, 03:35 PM   #10
gentleone
gentleone's Avatar
 
Join Date: Nov 2009
Location: Rhodes, Greece
Posts: 2,837
Default

Quote:
Originally Posted by glassonion View Post
Sure, I'm not 100% sure why this worked. But in the rule for AccordionPanelContent, under the positioning tab I switched visibility to visible (it was blank) and I set overflow to auto (it was set to visible).
Good job! Thanks!
__________________
www.gentlemedia.nl
gentleone 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 08:11 AM.


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