Using Spry Accordion as menu problem
I am using the Spry Accordion widget as a menu/table of contents in a website and have encountered an issue that needs customization that I cannot seem to find anywhere.
Here is the link: http://2ndlookgraphics.com/slProfile/index.html
I have placed the menu in an iframe with links pointing to "parent" which seems to work well.
My problem is that whenever a link is clicked in any other than the first panel the menu reverts to the opening stance with te first panel open.
I would like, if possible to have the the panel that is currently being accessed to stay open until another tab is opened.
If this is not possible it would be best if the first panel were initially closed and if the accordian effect would initiate on hover rather than click.
I am using a "Fluid Grid" responsive layout but that does not seem to be affecting this issue.
I would appreciate some advice on this please.
All panels closed -
<script type="text/javascript">
<!--
var Accordion1 = new Spry.Widget.Accordion("Accordion1", { useFixedPanelHeights: false, defaultPanel: -1});
//-->
</script>
More here:
http://adobe.github.io/Spry/articles/data_api/apis/accordion.html
Similar Messages
-
Jquery Accordion as menu problem
I implemented Jquery accordion as a menu. I have following setup for the accordion menu (page template body region position 3, column 1):
MENU 1
¦_ Link to report 1
¦_ Link to report 2
MENU 2
¦_ Link to report 3
¦_ Link to report 4
On page template body region position 3, column 2 .... I have the Jquery Tab to shows the selected report according to the accordion menu selection.
At initial page loading, MENU 1 is expanded and MENU to is collapse...this is OK.
Then user clicks on the MENU 2, immediately the MENU 1 collapsed and MENU 2 expanded and shown the "Link to report 3" and "Link to report 4".
But when user clicks on the "Link to report 3", the page is refresh / submitted and the Jquery tab on column 2 showing the correct report but the accordion MENU 1 is expanded and MENU 2 is collapsed.
How can I make: when user clicks on menu item (Link to report 3 or Link to report 4) of MENU 2, the MENU 2 still expanded and MENU 1 is still collapsed?Hello,
You can programitacally open the right tab. Here is the code I use on http://anychart.apex-evangelists.com (the menu on the left is an accordion)
<script type="text/javascript">
$(function() {
$('#accordion').accordion({
header: 'h3',
active: '.selected',
selectedClass: 'active'
</script>Regards,
Dimitri
http://dgielis.blogspot.com/
http://www.apex-evangelists.com/ -
I'm getting used to this widget, but I have a question. The first panel always has the content space open. What do I change so that the content space starts closed, like the panels below them?
stanopoly wrote:
What do I change so that the content space starts closed, like the panels below them?
The answer is here: http://labs.adobe.com/technologies/spry/samples/accordion/AccordionSample.html#AllPanelsCl osed. -
Using WEBUTIL in the Menu - problems when not in current form..
We make a webutil call in the menu - but it is a problem when the current form does not have webutil attached to it.
Is there any work around other than putting webutil in 100 forms?
OPEN_FORM/CALL_FORM both affected.
Message was edited by:
brian952
Message was edited by:
brian952I've just spotted this thread, so my comments might be too late to be useful, but... I had a similar problem, and as Eric suggested, went for the approach of having a single, small form dedicated solely to running Webutil functions. Any form or menu option that needs to do something WebUtil-related (e.g. 'I need to have File A moved from the apps server to the client') calls a library routine which then calls the dedicated form, passing it all the instructions it needs to carry out the action. Control then returns to the original form. At the moment, I leave the dedicated form in the background in modeless state, so it can be used again if needed elsewhere without having to be reloaded. (If the user tries to click on the modeless form, it shoves control straight back to the 'main' form.)
I read somewhere that ideally you shouldn't WebUtil-enable every form, if most of the time, most of them won't use it. There's the overhead of initialising all the beans every time a form is opened, and it seems to me that that's relatively intensive, as bean usage goes. Not a showstopper by any means, though.
James -
HOW DO I USE 'SPRY MENU BAR?'
Please i need an indept explanation of how to use spry to create menu bars to my satisfaction. Your useful information shall be highly appreciation. Thanks!
Spry menus have been deprecated and, if you are using an older version of Spry, it will not work on Mobile!
So don't.
You can do drop-down menus with rollover effects and everything simply by using straight HTML and CSS. You do have to know HTML and CSS though. Another great way to simply use a plugin is to go to Project Seven and buy their system (there are others out there, but the guys at PVII are particularly crafty and their menu systems work with all browsers, including the really bad Microsoft ones).
Here is a link to a tutorial that will show you how to do a straight HTML and CSS3 dropdown menu yourself. -
Spry pull down menu doesn't show in IE6
Hi,
I'm learning DW.
I used spry pull down menu for main navigation bar, and it is
working in Firefox, Safari, and Opera. Then I asked my client who
has IE6 to look, it doesn't show spry menu bar, it is white, and
pull down doesn't show.
I researched and tried but I couldn't figured out. (although
quiet few posting about same kind of problem. Since I don't have
IE, it is hard to test and solve the problem also. Could you help
me??
My
sprymenu bar
My site with spry
menu bar
Thanks in advance,In Firefox 4, "Organize Bookmarks" has been changed to "Show All Bookmarks" to open the Library window.
-
Spry Accordion has suddenly stopped working
I have used Spry accordion on a website created 7 months ago.
For seven months, it has worked just fine... all panels are closed
when the page is accessed, then one can be opened at a time. In the
last day or two, the panels have stopped working... all are open
when the page is accessed. There have been no changes made to the
files in the past seven months, so I don't know what has happened.
The problem appears on mac and pc in Safari, Firefox, IE. PC/IE
reports that "Spry is undefined" which I think is referring to the
script at the bottom of the page that reads:
quote:
<script type="text/javascript">
<!--
var Accordion1 = new Spry.Widget.Accordion("Accordion1", {
useFixedPanelHeights: false, defaultPanel: -1 });
var CollapsiblePanel1 = new
Spry.Widget.CollapsiblePanel("CollapsiblePanel1", { contentIsOpen:
false });
//-->
</script>
Help???
One of the
problem pagesFixed... there was a bad link to the js file.
-
Printing a Spry Accordion form
I have used Spry Accordion to make a rather complex form work
very well ..
but now I have a problem. The client wants to be able to
print out the form
and I'm having trouble getting it to work. I have put a copy
where it can
be viewed but you can see when you do a print preview, only
the Accordion
tab that is open is displayed.
Ideally, what I would like is for each tab to go to the next
page and print
them all. Any thoughts?
http://www.linkerfinancial.com/printcopyform.asp
Thanks!
Nancy Gill
Adobe Community Expert
Author: Dreamweaver 8 e-book for the DMX Zone
Co-Author: Dreamweaver MX: Instant Troubleshooter (August,
2003)
Technical Editor: DMX 2004: The Complete Reference, DMX 2004:
A Beginner''s
Guide, Mastering Macromedia Contribute
Technical Reviewer: Dynamic Dreamweaver MX/DMX: Advanced PHP
Web DevelopmentIt's all fixed .. for those who are curious and need a print
style sheet
with an Accordion, Thierry Koblentz got me all fixed up with
this style
sheet .. the bottom part is specific to the Accordion part to
override the
SpryAccordion.css rules:
@charset "utf-8";
/* CSS Document */
body {
color:#000;
margin: 0;padding:0;
background-color: #5B6D85;
font-family: Verdana, Arial, Helvetica, sans-serif;
font-size: 12pt;
#content {
margin-top: 10px;
margin-right: 10px;
margin-bottom: 10px;
margin-left: 8px;
input, select {
background-color: #F5F5F5;
color: #666666;
font: 12px Verdana, Arial, Helvetica, sans-serif;
fieldset {
margin-top: 5px;
margin-right: 2px;
margin-bottom: 5px;
margin-left: 2px;
padding: 0;
label {
font-size: 10px;
font-weight: bold;
margin-right: 5px;
.buttons {
font-family: Verdana, Arial, Helvetica, sans-serif;
font-size: 10px;
background-color: #8887CD;
color: #FFFFFF;
margin-right: 6px;
font-weight: bold;
margin-left: 10px;
border: solid #000 1px;
#footer,#logo,.AccordionPanelTab,#submit,a:link{display:none}
div.AccordionPanelContent {
height: auto !important;
div.Accordion {border:none}
* {overflow:visible !important;height:auto !important}
#header {overflow:hidden !important;}
Nancy -
Firefox Spry Accordion widget
Hello, I am trying to use Spry Accordion widget. When I click one of the other panels they all turn a strange neon blue color. Anyone know of any fixes?
The below is the index page and below that is SpryAccordion.css
index
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8" />
<title>Conferences</title>
<script src="SpryCollapsiblePanel.js" type="text/javascript"></script>
<script src="../SpryAssets/SpryAccordion.js" type="text/javascript"></script>
<link href="SpryCollapsiblePanel.css" rel="stylesheet" type="text/css" />
<link href="css.css" rel="stylesheet" type="text/css" />
<style type="text/css">
</style>
<link href="../SpryAssets/SpryAccordion.css" rel="stylesheet" type="text/css" />
</head>
<body>
<div id="outside">
<div id="outsideone">
<div id="CollapsiblePanel1" class="CollapsiblePanel">
<div class="CollapsiblePanelTab" tabindex="0">Tab</div>
<div class="CollapsiblePanelContent">
<p>Content ssss</p>
<p>lkajsdfl</p>
</div>
</div>
<script type="text/javascript">
var CollapsiblePanel1 = new Spry.Widget.CollapsiblePanel("CollapsiblePanel1");
</script>
<!-- This is commented out -->
<div id="photo"></div>
<div id="contentholder">
<div id="contentsone"> <div id="moreone">
<div id="Accordion1" class="Accordion" tabindex="0">
<div class="AccordionPanel">
<div class="AccordionPanelTab">Label 1</div>
<div class="AccordionPanelContent">Content 1</div>
</div>
<div class="AccordionPanel">
<div class="AccordionPanelTab">Label 2</div>
<div class="AccordionPanelContent">Content 2</div>
</div>
</div>
</div> <div id="insidecontentsone"></div></div>
<div id="lineone"> </div>
<div id="contentstwo"> <div id="moretwo">
<div id="Accordion2" class="Accordion" tabindex="0">
<div class="AccordionPanel">
<div class="AccordionPanelTab">Label 1</div>
<div class="AccordionPanelContent">Content 1</div>
</div>
<div class="AccordionPanel">
<div class="AccordionPanelTab">Label 2</div>
<div class="AccordionPanelContent">Content 2</div>
</div>
</div>
</div>
<div id="insidecontentstwo"></div></div>
<div id="linetwo"> </div>
<div id="contentsthree"> <div id="morethree">
<div id="Accordion3" class="Accordion" tabindex="0">
<div class="AccordionPanel">
<div class="AccordionPanelTab">Label 1</div>
<div class="AccordionPanelContent">Content 1</div>
</div>
<div class="AccordionPanel">
<div class="AccordionPanelTab">Label 2</div>
<div class="AccordionPanelContent">Content 2</div>
</div>
</div>
</div><div id="insidecontentsthree"></div></div>
</div>
</div>
</div>
<script type="text/javascript">
var Accordion1 = new Spry.Widget.Accordion("Accordion1", { defaultPanel: 1 });
var Accordion2 = new Spry.Widget.Accordion("Accordion2", { defaultPanel: 1 });
var Accordion3 = new Spry.Widget.Accordion("Accordion3", { defaultPanel: 1 });
</script>
</body>
</html>
SpryAccordion.css
@charset "UTF-8";
/* SpryAccordion.css - version 0.5 - Spry Pre-Release 1.6.1 */
/* Copyright (c) 2006. Adobe Systems Incorporated. All rights reserved. */
/* This is the selector for the main Accordion container. For our default style,
* we draw borders on the left, right, and bottom. The top border of the Accordion
* will be rendered by the first AccordionPanelTab which never moves.
* If you want to constrain the width of the Accordion widget, set a width on
* the Accordion container. By default, our accordion expands horizontally to fill
* up available space.
* The name of the class ("Accordion") used in this selector is not necessary
* to make the widget function. You can use any class name you want to style the
* Accordion container.
.Accordion {
overflow: hidden;
border-top-width: 0px;
border-right-width: 0px;
border-bottom-width: 0px;
border-left-width: 0px;
border-right-style: none;
border-bottom-style: none;
border-left-style: none;
border-right-color: none;
border-bottom-color: none;
border-left-color: none;
background-image: url(white.png);
background-color: none;
border-top-style: none;
/* This is the selector for the AccordionPanel container which houses the
* panel tab and a panel content area. It doesn't render visually, but we
* make sure that it has zero margin and padding.
* The name of the class ("AccordionPanel") used in this selector is not necessary
* to make the widget function. You can use any class name you want to style an
* accordion panel container.
.AccordionPanel {
margin: 0px;
padding: 0px;
background-image: url(white.png);
/* This is the selector for the AccordionPanelTab. This container houses
* the title for the panel. This is also the container that the user clicks
* on to open a specific panel.
* The name of the class ("AccordionPanelTab") used in this selector is not necessary
* to make the widget function. You can use any class name you want to style an
* accordion panel tab container.
* NOTE:
* This rule uses -moz-user-select and -khtml-user-select properties to prevent the
* user from selecting the text in the AccordionPanelTab. These are proprietary browser
* properties that only work in Mozilla based browsers (like FireFox) and KHTML based
* browsers (like Safari), so they will not pass W3C validation. If you want your documents to
* validate, and don't care if the user can select the text within an AccordionPanelTab,
* you can safely remove those properties without affecting the functionality of the widget.
.AccordionPanelTab {
background-color: #CCCCCC;
border-top: solid 1px black;
border-bottom: solid 0px gray;
margin: 0px;
padding: 2px;
cursor: pointer;
-moz-user-select: none;
-khtml-user-select: none;
background-image: url(white.png);
/* This is the selector for a Panel's Content area. It's important to note that
* you should never put any padding on the panel's content area if you plan to
* use the Accordions panel animations. Placing a non-zero padding on the content
* area can cause the accordion to abruptly grow in height while the panels animate.
* Anyone who styles an Accordion *MUST* specify a height on the Accordion Panel
* Content container.
* The name of the class ("AccordionPanelContent") used in this selector is not necessary
* to make the widget function. You can use any class name you want to style an
* accordion panel content container.
.AccordionPanelContent {
overflow: auto;
margin: 0px;
padding: 0px;
height: 200px;
background-image: url(white.png);
/* This is an example of how to change the appearance of the panel tab that is
* currently open. The class "AccordionPanelOpen" is programatically added and removed
* from panels as the user clicks on the tabs within the Accordion.
.AccordionPanelOpen .AccordionPanelTab {
background-color: #none;
background-image: url(white.png);
/* This is an example of how to change the appearance of the panel tab as the
* mouse hovers over it. The class "AccordionPanelTabHover" is programatically added
* and removed from panel tab containers as the mouse enters and exits the tab container.
.AccordionPanelTabHover {
color: #555555;
background-image: url(white.png);
.AccordionPanelOpen .AccordionPanelTabHover {
color: none;
background-image: url(white.png);
/* This is an example of how to change the appearance of all the panel tabs when the
* Accordion has focus. The "AccordionFocused" class is programatically added and removed
* whenever the Accordion gains or loses keyboard focus.
.AccordionFocused .AccordionPanelTab {
background-color: none;
background-image: url(white.png);
/* This is an example of how to change the appearance of the panel tab that is
* currently open when the Accordion has focus.
.AccordionFocused .AccordionPanelOpen .AccordionPanelTab {
background-color: none;
height: 15px;
background-image: url(white.png);
/* Rules for Printing */
@media print {
.Accordion {
overflow: visible !important;
background-image: url(white.png);
.AccordionPanelContent {
display: block !important;
overflow: visible !important;
height: auto !important;
background-image: url(white.png);Welcome to the Forum!
If you can upload your page to a server and give us a link, we will be able to look at your page in action. Just seeing the code is not enough.
Is this the first time you have used an Accordion? It is probable that the bright neon blue you are seeing is the default style, which you can change in the CSS file. I believe it was designed that color to highlight the feature you want to change .
Take a look in the Accordion's CSS file (it will show as an associated file at the top of your document window) for color rules, and adjust them to suit your palette (and your palate!). Check out the CSS Styles Panel (use Current mode) for a handy way to know what you are looking at. Click on the Accordion in Design View and the rules will be highlighted in the CSS Styles Panel. (Click the right-hand stair-step icon to see the style cascade.)
Beth -
Spry accordion panel not lining up with top of viewport in FF3.5
I have created a new web page using spry accordion for the first time on my site. In IE8 all works perfectly - opening and closing and moving between tabs is smoothly done. My first tab opens a very long panel (way over the web browser's height), and scrolling down through the text brings us to the second tab. I disabled fixed panel heights - these expand fully when the relevent header is clicked. Clicking the second tab in IE8 closes the first panel smoothly, opens the second panel smoothly and leaves the browser sitting so the 2nd tab is in line with the top of the browser window. Perfect!
In FF3.5, following the same routine, with the first panel open, and scrolling down to the 2nd tab - click this and it closes/opens the panels, but is very jerky doing this and you are left with the browser window looking at the very bottom of the web page, instead of at the top of the panel.
I'd appreciate any advice on this before I give up and move to JQuery. Is this a bug?
**UPDATE** I tried Jquery and the results are worse! It doesnt even line up in IE8.
Please feel free to check out the code here:
http://www.pjamedia.com/?page=modeladvice
Any help would be very much appreciated.
Thanks, Paul Aso take an anchor at the begining of the Accordian panle, link the <a> tag to the anchor point.
<script type="text/javascript">
function goToAnchor() {
location.href = "#unilist";
</script>
paste this script in <head> tag.
<a name="unilist" id="unilist"></a> // add an anchor tag before the accordion panel.
<div id="Accordion1" class="Accordion">
<div class="AccordionPanel">
<div class="AccordionPanelTab" ><a onclick="goToAnchor();"> University, Ohio*</a></div>
<div class="AccordionPanelContent">content</div></div>
<div class="AccordionPanel">
<div class="AccordionPanelTab" ><a onclick="goToAnchor();"> University, oiowa*</a></div>
<div class="AccordionPanelContent">content</div></div>
</div> -
Hi, i use Spry Accordion for this site:
dailycast.de
I want to close a open panel by clicking on these panel?
Here is my Code:
CODE
I found a tutorial on adobe Labs, but i dont understand this
http://labs.adobe.com/technologies/spry/samples/accordion/AccordionSample.html#Programatic OpenAndClose
Thanks for helping me, and sorry about my bad english!
Greets from germanyHello SpryRookie,
If you look at the code of your page you will find the
constructor of your accordion. (var .. = new Spry.Widget.Accordion(
You can add options in the constructor.
var .. = new
Spry.Widget.Accordion('id-of-the-element',{options});
To have it closed you need to set the defaultPanel option to
a negative value, and useFixedPanelHeights to false.
So you new constructor should look like:
var variablename = new
Spry.Widget.Accordion('id-element',{useFixedPanelHeights: false,
defaultPanel: -1 });
save, reload the page and it should work.
@ausm94 you can download the complete Spry package including
all samples and API from adobe labs:
labs.adobe.com/technologies/spry/ -
Using an image as label in Spry Accordion Menu
I was wondering if it was possible to use an image instead of
text in the spry accordion menu. I have replaced the text that is
there with a roll-over image link however I'm unable to label it
since it uses the text as the label and therefore can't set the
default panel I want opened. Is there a way to do this? Thanks for
your help.Stefaan Lesage wrote:
Is this possible with Pages 09 ? And can I achieve this ?
Is it possible to look at the Help or at the Pages User Guide
In the English one, page 17, we may read:
• Some graphics, such as watermarks or logos, appear on pages. These objects are called master objects. If you cannot select an object in a template, it’s probably a master object. To learn more, see “Using Master Objects (Repeated Background Images)” on page 60.
You can drag or place objects on a page, including imported graphics, movies, and sound, or objects that you create within Pages, including text boxes, charts, tables, and shapes.
You can also insert pages that have been preformatted for the template you’re using. Click Pages or Sections in the toolbar and choose a template page. The new page is added immediately after the page where you placed the insertion point.
Yvan KOENIG (from FRANCE vendredi 27 février 2009 23:01:32) -
Spry Accordion problem using URLutilis
Hi, I'm using a spry accordion and have the 3rd panel opening as default.
I'm now trying to use URLutilis to open a specific accordion panel from another html page,
but as soon as I amend the target page code, all the panels of my accordion default to open.
This is the code I'm using in the head:
<script type="text/javascript" src="SpryAssets/SpryURLUtils.js"></script>
<script type="text/javascript">
var params = Spry.Utils.getLocationParamsAsObject();
</script>
This is the code I'm using in the body:
var Accordion1 = new Spry.Widget.Accordion("Accordion1", {defaultPanel: params.panel ? params.panel: 1});
I still have SpryAccordion.js set as:
this.defaultPanel = 2;
Could someone let me know where I'm going wrong and why all panels are now open?
Cheers,
AndySince the answer to your question requires some knowledge of Spry, you might want to post it in the Spry forum. Be prepared to post a URL to the problem page, if asked.
Mark A. Boyd
Keep-On-Learnin' :-) -
Spry Accordion collapsing problem
I am using an accordion on my site, and also took the advice to update to the latest spry, which didn't seem to make a lot of difference to be honest (I am using DW CS3)
But the problem I am having is when you first come to the page the menu isn't completely collapsed and I wonder if there is a way of doing this...
This is not happening in latest firefox, IE8 or safari on a windows pc
here is a link to the page http://www.antworks.co.uk/mobymemory/menu.html
see the code below. Any help would be greatly appreciated. Thanks
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<title>Untitled Document</title>
<script src="SpryAssets/SpryAccordion.js" type="text/javascript"></script>
<link href="SpryAssets/SpryAccordion.css" rel="stylesheet" type="text/css" />
</head>
<body>
<div id="Accordion1" class="Accordion" tabindex="0">
<div class="AccordionPanel">
<div class="AccordionPanelTop" onclick="Accordion1.openPanel(0); return false;">memory cards (make)</div>
<div class="AccordionPanelContent">
<img src="images/new/trans.gif" width="7" height="7" /><br />micro SD / Transflash<br />
<img src="images/new/trans.gif" width="7" height="12" /><br />micro SD / Transflash<br />
<img src="images/new/trans.gif" width="7" height="12" /><br />micro SD / Transflash<br />
<img src="images/new/trans.gif" width="7" height="12" /><br />micro SD / Transflash<br />
<img src="images/new/trans.gif" width="7" height="12" /><br />micro SD / Transflash<br />
<img src="images/new/trans.gif" width="7" height="12" /><br />micro SD / Transflash<br />
<img src="images/new/trans.gif" width="7" height="12" /><br />micro SD / Transflash<br />
<img src="images/new/trans.gif" width="7" height="12" /><br />micro SD / Transflash<br />
<img src="images/new/trans.gif" width="7" height="12" /><br />micro SD / Transflash<br />
<img src="images/new/trans.gif" width="7" height="12" /><br />micro SD / Transflash<br />
<img src="images/new/trans.gif" width="7" height="12" /><br />micro SD / Transflash<br />
<img src="images/new/trans.gif" width="7" height="12" /><br />micro SD / Transflash<br />
<img src="images/new/trans.gif" width="7" height="12" /><br />micro SD / Transflash<br />
<img src="images/new/trans.gif" width="7" height="3" />
</div>
</div>
<div class="AccordionPanel">
<div class="AccordionPanelTab" onclick="Accordion1.openPanel(1); return false;">memory cards (brand)</div>
<div class="AccordionPanelContent2">Content 2</div>
</div>
<div class="AccordionPanel">
<div class="AccordionPanelTab" onclick="Accordion1.openPanel(2); return false;">mobile accessories</div>
<div class="AccordionPanelContent">Content 2</div>
</div>
<div class="AccordionPanel">
<div class="AccordionPanelTab" onclick="Accordion1.openPanel(3); return false;">gaming</div>
<div class="AccordionPanelContent">Content 2</div>
</div>
<div class="AccordionPanel">
<div class="AccordionPanelTab" onclick="Accordion1.openPanel(4); return false;">computing</div>
<div class="AccordionPanelContent">Content 2</div>
</div>
<div class="AccordionPanel">
<div class="AccordionPanelBot" onclick="Accordion1.openPanel(5); return false;">customer login</div>
<div class="AccordionPanelContent">Content 2</div>
</div>
</div>
<script type="text/javascript">
<!--
//var Accordion1 = new Spry.Widget.Accordion("Accordion1", {closedClass:"Accordion"});
//var Accordion1 = new Spry.Widget.Accordion("Accordion1", {closedClass:"AccordionPanel"});
var Accordion1 = new Spry.Widget.Accordion("Accordion1", { useFixedPanelHeights: false });
//-->
</script>
</body>
</html>
css
@charset "UTF-8";
/* SpryAccordion.css - Revision: Spry Preview Release 1.4 */
/* Copyright (c) 2006. Adobe Systems Incorporated. All rights reserved. */
/* This is the selector for the main Accordion container. For our default style,
* we draw borders on the left, right, and bottom. The top border of the Accordion
* will be rendered by the first AccordionPanelTab which never moves.
* If you want to constrain the width of the Accordion widget, set a width on
* the Accordion container. By default, our accordion expands horizontally to fill
* up available space.
* The name of the class ("Accordion") used in this selector is not necessary
* to make the widget function. You can use any class name you want to style the
* Accordion container.
.Accordion {
width: 174px;
overflow: hidden;
/* This is the selector for the AccordionPanel container which houses the
* panel tab and a panel content area. It doesn't render visually, but we
* make sure that it has zero margin and padding.
* The name of the class ("AccordionPanel") used in this selector is not necessary
* to make the widget function. You can use any class name you want to style an
* accordion panel container.
.AccordionPanel {
margin: 0px;
padding: 0px;
/* This is the selector for the AccordionPanelTab. This container houses
* the title for the panel. This is also the container that the user clicks
* on to open a specific panel.
* The name of the class ("AccordionPanelTab") used in this selector is not necessary
* to make the widget function. You can use any class name you want to style an
* accordion panel tab container.
.AccordionPanelTab {
background-color: #CCCCCC;
letter-spacing: -0.04em;
background-image: url(../images/new/spry/meun_blue.gif);
background-repeat: no-repeat;
padding: 8px 0 0 12px;
height: 21px;
font-family: Arial, Helvetica, sans-serif;
color:#666666;
font-size: 14px;
font-weight: bold;
margin: 0px;
cursor: pointer;
-moz-user-select: none;
-khtml-user-select: none;
.AccordionPanelTop {
background-color: #CCCCCC;
letter-spacing: -0.04em;
background-image: url(../images/new/spry/meun_top.gif);
background-repeat: no-repeat;
padding: 8px 0 0 12px;
height: 22px;
font-family: Arial, Helvetica, sans-serif;
color:#666666;
font-size: 14px;
font-weight: bold;
margin: 0px;
cursor: pointer;
-moz-user-select: none;
-khtml-user-select: none;
.AccordionPanelBot {
background-color: #CCCCCC;
letter-spacing: -0.04em;
background-image: url(../images/new/spry/meun_bot.gif);
background-repeat: no-repeat;
padding: 8px 0 0 12px;
height: 21px;
font-family: Arial, Helvetica, sans-serif;
color:#666666;
font-size: 14px;
font-weight: bold;
margin: 0px;
cursor: pointer;
-moz-user-select: none;
-khtml-user-select: none;
/* This is the selector for a Panel's Content area. It's important to note that
* you should never put any padding on the panel's content area if you plan to
* use the Accordions panel animations. Placing a non-zero padding on the content
* area can cause the accordion to abruptly grow in height while the panels animate.
* Anyone who styles an Accordion *MUST* specify a height on the Accordion Panel
* Content container.
* The name of the class ("AccordionPanelContent") used in this selector is not necessary
* to make the widget function. You can use any class name you want to style an
* accordion panel content container.
.AccordionPanelContent {
letter-spacing: -0.05em;
background-image: url(../images/new/spry/meun_grey.gif);
background-repeat: repeat-y;
padding: 0 0 0 12px;
font-family: Arial, Helvetica, sans-serif;
color:#7f879e;
font-size: 14px;
font-weight: bold;
overflow: hidden;
margin: 0px;
.AccordionPanelContent2 {
letter-spacing: -0.05em;
background-image: url(../images/new/spry/meun_grey.gif);
background-repeat: repeat-y;
padding: 0 0 0 12px;
font-family: Arial, Helvetica, sans-serif;
color:#7f879e;
font-size: 14px;
font-weight: bold;
overflow: auto;
margin: 0px;
height: 200px;
/* This is an example of how to change the appearance of the panel tab that is
* currently open. The class "AccordionPanelOpen" is programatically added and removed
* from panels as the user clicks on the tabs within the Accordion.
.AccordionPanelOpen .AccordionPanelTab {
background-color: #EEEEEE;
/* This is an example of how to change the appearance of the panel tab as the
* mouse hovers over it. The class "AccordionPanelTabHover" is programatically added
* and removed from panel tab containers as the mouse enters and exits the tab container.
.AccordionPanelTabHover {
color: #555555;
.AccordionPanelOpen .AccordionPanelTabHover {
color: #555555;
/* This is an example of how to change the appearance of all the panel tabs when the
* Accordion has focus. The "AccordionFocused" class is programatically added and removed
* whenever the Accordion gains or loses keyboard focus.
.AccordionFocused .AccordionPanelTab {
background-color: #3399FF;
/* This is an example of how to change the appearance of the panel tab that is
* currently open when the Accordion has focus.
.AccordionFocused .AccordionPanelOpen .AccordionPanelTab {
background-color: #33CCFF;Teisho wrote:
Thanks for your answer, the problem that I still have is that I am trying to close all the Accordions when clicking
on the last panel.
I have looked at the Accordion.closePanel() , but that throws an error
http://labs.adobe.com/technologies/spry/articles/data_api/apis/accordi on.html
thanks Ant
I am not sure what you want to do here. When you click on an open panel, the panel closes; when you click on a closed panel, it opens and closes any panel that is open.
Please explain.
Sorry, did not see your new post which does explain what you want.
Message was edited by: vw2ureg -
When inserting spry accordion and spry collapsible menus from
dreamweaver cs3 in a blank html page i get a javascript error and
continue to get them making the use of these spry menus unworkable.
The error says" While executing inspectSelection in
spry_accordion.htm, a Javascript error occured." Does anyone know
of a fix to this problem?Hi Lucaandluna,
Well the website page I have linked was done in Dreamweaver
MX (think thats version 8) and I used the Pop Up Menu behaviour in
that program. Its a great little tool and you can change the sub
menu text and box size and much more. BUT I can not easily copy
this to other pages as when I do copy it looses all the information
on the Drop down menu. Thus for every page on my website I have to
change each Drop Down menu by hand which is a very time consuming
process. Thus I want to use a CSS menu system so I only have to
updage the Drop Down menu once for the whole site.
So I have the same problem with the sub menu text, I can't
seem to figure out how to make the colour different from the main
menu. For the look of my Spry Menu I have been altering the Spry
CSS file. IF you don't want thos little arrows then look in the CSS
file for something called Submenu Indication. There you will find
the Gif files for the arrows, delete the ones u don't want.
Maybe you are looking for
-
How do i monitor performance in the system of a Java program in Windows XP?
I want to record the CPU usage and Memory usage on an hourly basis programatically, for an already running java class in Windows XP environment for the purpose of testing the Java class. The recording has to be done independent of the java class.By C
-
I am directed The document "Video.MOV" could not be opened. The movie's file format isn't recognized QuickTime Movie (.mov) MPEG-4 (.mp4, .m4v) MPEG-2 (OS X Lion or later) MPEG-1 3GPP 3GPP2 AVCHD (OS X Mountain Lion only) AVI DV MPEG-2 (OS X Lion
-
Currently I'm not using Aperture 1.1, or 1.0 or at all. I don't want to spend an extra £350GBP to receive £130 Apple Credits/Vouchers to purchase V1.0 to upgrade through the web to 1.1 or now 1.1.1. As I don't need to bank with Apple. This means that
-
Hi! For my photo book I'll use like 8-10 templates. I would like to save them somehow so that I can just add them quickly on my new created pages. Any idea? Thanks!
-
Can you get newsstand on your iMac or Macbook Pro
How do you connect ipad to internet if you only have an ethernet cable on your macbook pro ??