Dreamweaver Club Forums

Dreamweaver Club Forums (http://www.dreamweaverclub.com/forum//index.php)
-   Spry (http://www.dreamweaverclub.com/forum//forumdisplay.php?f=189)
-   -   Spry Accordian Question - variable height for content and tabs closed to start (http://www.dreamweaverclub.com/forum//showthread.php?t=42639)

glassonion 03-02-2012 12:49 PM

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!

gentleone 03-04-2012 12:07 PM

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.

glassonion 03-04-2012 04:36 PM

Quote:

Originally Posted by gentleone (Post 203228)
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!

gentleone 03-04-2012 06:21 PM

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.

glassonion 03-04-2012 08:04 PM

Excellent! Thanks so much!

glassonion 03-04-2012 08:43 PM

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.

glassonion 03-05-2012 05:53 AM

Nevermind that last question, gentleone. I was able to get it working in firefox. Thanks again for everything - much appreciated.

gentleone 03-05-2012 02:39 PM

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?

glassonion 03-05-2012 03:20 PM

Quote:

Originally Posted by gentleone (Post 203243)
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).

gentleone 03-05-2012 03:35 PM

Quote:

Originally Posted by glassonion (Post 203244)
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! :cool:


All times are GMT. The time now is 02:25 AM.

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