PDA

View Full Version : Spry Accordian Question - variable height for content and tabs closed to start


glassonion
03-02-2012, 01:49 PM
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, 01: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, 05:36 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.

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 (http://gioahmad.com/weehawken/test_dh/administration.html)

Thanks again!

gentleone
03-04-2012, 07:21 PM
If you go into code view you'll see at line 405 this:

<script type="text/javascript">
var Accordion1 = new Spry.Widget.Accordion("Accordion1");
</script>

Replace that piece of javascript with this:

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

That'll do.

glassonion
03-04-2012, 09:04 PM
Excellent! Thanks so much!

glassonion
03-04-2012, 09: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, 06: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, 03: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, 04:20 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?

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, 04:35 PM
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:

barbara37
10-21-2013, 08:30 PM
Thanks so much for solving this for me. I really appreciate it!

love123
04-24-2017, 04:41 AM
Thanks for the info.












จีคลับ (https://sbobetgoals.com/%E0%B8%88%E0%B8%B5%E0%B8%84%E0%B8%A5%E0%B8%B1%E0%B 8%9A.html)

Bill Goldberg
04-24-2017, 08:14 AM
Thank you so much for the information.