Try to keep accordion panel open when selected

Hello,
Could someone help me find the code to "keep the selected panel open" instead of having them closed on each pages.
There is 2 spry collapsed panels. Within the first one there is 1 Spry Accordion with 5 panels  which need to stay open when selected.
You will find the site here : www.otaa.fr (but you may use Safari)
Here the codes:
<Head>
<script type="text/javascript" src="SpryAssets/SpryURLUtils.js"></script>
<script src="Scripts/swfobject_modified.js" type="text/javascript"></script>
<script type="text/javascript"> var params = Spry.Utils.getLocationParamsAsObject(); </script>
<style type="text/css">
</head>
<body>
<div id="CollapsiblePanel2" class="CollapsiblePanel">
          <div class="CollapsiblePanelTab" tabindex="0">PROJETS</a></div>
          <div class="CollapsiblePanelContent">
                <td><div id="Accordion1" class="Accordion">
                  <div class="AccordionPanel">
                    <div class="AccordionPanelTab">Logements</a></div>
                    <div class="AccordionPanelContent">
                        <tr>
                          <td height="21" align="left"><a href="html/Vignoles.html">Rue des Vignoles</a></td>
                      </tr>
                    </table>
            <div class="AccordionPanel">
                    <div class="AccordionPanelTab">Maisons</a></div>
                    <div class="AccordionPanelContent">
                        <tr>
                          <td align="left"><a href="html/Serrieres.html">Maison Serrières</a></td>
                      </tr>
                    </table>
               <div class="AccordionPanel">
                    <div class="AccordionPanelTab">Bureaux et Sièges Sociaux </a></div>
                    <div class="AccordionPanelContent">
                        <tr>
                          <td align="left"><a href="html/Tchad.html">Ambassade du Tchad</a></td>
                      </tr>
                    </table>
               <div class="AccordionPanel">
                    <div class="AccordionPanelTab">Aménagements Intérieurs</a></div>
                    <div class="AccordionPanelContent">
                        <tr>
                          <td align="left"><a href="html/Martin.html">Appartement Martin</a></td>
                      </tr>
                    </table>
               <div class="AccordionPanel">
                    <div class="AccordionPanelTab">Equipements</a></div>
                    <div class="AccordionPanelContent">
                        <tr>
                          <td align="left"><a href="html/Aquatonic.html">Centre Aquatique</a></td>
                      </tr>
                    </table>           
< /body>
<script type="text/javascript">
var CollapsiblePanel2 = new Spry.Widget.CollapsiblePanel("CollapsiblePanel2", {contentIsOpen:false});
var CollapsiblePanel3 = new Spry.Widget.CollapsiblePanel("CollapsiblePanel3");
var accordion1 = new Spry.Widget.Accordion("Accordion1", { useFixedPanelHeights: false, defaultPanel:(params.panel?params.panel:-1)});
          </script>
Thanks for you help.

Forget about the tutorial by David Powers. There is an easier way to achieve what you want.
If I understand right, you want the about panel to be open when on the about page and the homw panel when you are on the home page. Simply set the default panel for each page as follows
For the Home page
<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8">
<title>Home Page</title>
<link href="SpryAssets/SpryAccordion.css" rel="stylesheet">
<script src="SpryAssets/SpryAccordion.js"></script>
</head>
<body>
<div id="Accordion1" class="Accordion" tabindex="0">
  <div class="AccordionPanel">
    <div class="AccordionPanelTab">Home</div>
    <div class="AccordionPanelContent"><a href="index.html">Home</a></div>
  </div>
  <div class="AccordionPanel">
    <div class="AccordionPanelTab">About</div>
    <div class="AccordionPanelContent"><a href="about.html">About Us</a></div>
  </div>
</div>
<script>
var Accordion1 = new Spry.Widget.Accordion("Accordion1", {defaultPanel: 0});
</script>
</body>
</html>
and for the About page
<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8">
<title>About Us</title>
<link href="SpryAssets/SpryAccordion.css" rel="stylesheet">
<script src="SpryAssets/SpryAccordion.js"></script>
</head>
<body>
<div id="Accordion1" class="Accordion" tabindex="0">
  <div class="AccordionPanel">
    <div class="AccordionPanelTab">Home</div>
    <div class="AccordionPanelContent"><a href="index.html">Home</a></div>
  </div>
  <div class="AccordionPanel">
    <div class="AccordionPanelTab">About</div>
    <div class="AccordionPanelContent"><a href="about.html">About Us</a></div>
  </div>
</div>
<script>
var Accordion1 = new Spry.Widget.Accordion("Accordion1", {defaultPanel: 1});
</script>
</body>
</html>
Repeat this process for each of your pages.
Gramps

Similar Messages

  • Accordion panels open when website launches

    All my accordion panels appear open for a second before my page completely loads. I have tried to find fixes in the forum but the only one that I have found is to use  SpryAccordion.js - version 0.15 - Spry Pre-Release 1.6.1...I am already using this version and I am still having the issue. It appears to work fine with firefox but I have the issue in IE8. I am quit the novice with web design, any help anyone can give woyld be greatly appreciated.
    Here in the link to my site http://www.fcps.edu/southcountyss/

    There is a whole heap of stuff between rendering the markup for the accordion and creating an instance of the accordion.
    To eliminate the pause between render and instance, move the accordion constructor to just below the table that holds the accordion as in
                    <!-- ............. rest of markup -->
                    Student Services (MS):
                    703-446-1640<br />
                    Student Services (MS):                703-446-1630<br />
                    </p>
    </div>
                </div>
              </div></td>
          </tr>
        </table>
    <script type="text/javascript">
    var Accordion1 = new Spry.Widget.Accordion("Accordion1");
    </script>
    Don't forget to remove the constructor from the bottom of the document.
    Gramps

  • How can I make the spry accordion remember the panel open when I refresh the page or jump to a new page?

    How can I make the spry accordion remember the panel open
    when I refresh the page or jump to a new page?
    I am using the accordion feature on all my pages as a
    navigation aid. It has three panels. When you refresh the page the
    panel goes back to the default pane... Is there a way of
    controlling this so that the browser can remember the pane that is
    open (say set a variable, cookie, other?)

    Look for "Set the default open panel" on the following page:
    http://labs.adobe.com/technologies/spry/articles/accordion_overview/index.html
    Keep in mind you would need to change that bit of code on
    every page. The only way to do it more dynamically would be to
    include a custom javascript or PHP/ASP style script in order to
    change the value.

  • Keeping at Least One Accordion Panel Open with Variable Heights

    Hi -
    Is there a way to keep at least one panel open when using {
    useFixedPanelHeights: false }?
    Here's an example:
    http://labs.adobe.com/technologies/spry/samples/accordion/AccordionSample.html#VariablePan elHeights
    If panel 4 is open, and you click the panel 4 heading, it
    closes and no
    panel is open.
    Thanks,
    Rod

    Sorry, I didn't read my full message regarding wanting only
    one panel to open.
    What I ended up doing was using a PHP conditional to display
    a message if a certain variable was not passed in the URL. See my
    post on the Friends of Ed forum. Scroll to the bottom for my
    solution.
    http://friendsofed.infopop.net/4/OpenTopic?a=tpc&s=989094322&f=5283032876&m=3461018571

  • How to keep original email open when replying?

    I bet this is somthing simple, but I just can't figure it out. When I click reply on an email, the original closes. It's no big deal, but I like to have the original open to refer back to. Is there a way to set my mail to keep the original open when replying. Thanks in advance
    MacBook   Mac OS X (10.4.7)   Got my new MacBook. It's a wonderful thing!!! Video iPod!! Lots of toys!!!

    You're welcome.
    I am not getting the other option about keeping
    the preview pane visible.
    It seems you're not aware that the part of the main window where messages are listed can be split in two parts: the messages list at the top and the preview pane at the bottom. You can do this by either (1) dragging upwards the thin horizontal separator bar that's at the bottom of the window, or (2) just double-clicking on that bar (it has a tiny hole in the middle).
    How come when I delete an email in my .mac account,
    I have to delete it twice from the trash?
    Well, the answer to that question is way more involved than you might think.
    The behavior you've observed happens in Mail to any IMAP-type account for which deleted messages are stored locally (i.e. Preferences > Accounts > Mailbox Behaviors > Store deleted messages on the server has been turned OFF). The "reason" is that storing deleted messages locally for IMAP-type accounts causes Mail to move deleted messages in that account to a Deleted Messages (AccountName).mbox folder located within ~/Library/Mail/Mailboxes/.
    Deleting a message already in a Trash mailbox should cause the message to be permanently erased, BUT deleting a message from a mailbox located within ~/Library/Mail/Mailboxes/ (i.e. an "On My Mac" mailbox) should cause the message to be moved to the "On My Mac" Trash. Thus, in the particular case of a Deleted Messages (a Trash) mailbox stored within ~/Library/Mail/Mailboxes/, there are two conflicting behaviors, and it seems that Mail takes the latter into consideration first, i.e. deleting a message from the account's Trash under those conditions causes it to be moved to the "On My Mac" Trash instead of being permanently erased as would happen if the Deleted Messages folder was located within the account folder.
    This could very well be an oversight (a bug) rather than intended behavior, but that's how it works in the current version of Mail. If you're curious, the following somewhat amusing (but also lengthy and confusing) threads would give you an idea of how long it took me to figure out this one:
    emails won't delete on first try
    IMAP messages need trash deleted twice

  • Occasionally,  some of the image borders turn dark grey (medium grey is the default) and then random other  images cannot be opened with a double click.  They only open when selected using the arrows on the keyboard.  They also cannot be moved to collecti

    Occasionally,  some of the image borders turn dark grey (medium grey is the default) and then random other  images cannot be opened with a double click.  They only open when selected using the arrows on the keyboard.  They also cannot be moved to collections.  Anyone have a solution for this?

    When you say  "could not be opened"- what are you referring to?  A double click of the mouse should view the clicked image in Loupe view- the same as pressing [E] on the keyboard for an enlarged view. (And a second double-click will take you back to library grid view.)
    To "open" an image in the Development module requires you to select the image then press [D] or click on the [Develop] button.
    When you say "could not be ...moved" -what are you referring to?  Are you trying to move an image file from its place in a folder to another folder? Are you just wanting it in a collection? When you drag an image to a collection you are only placing a link to the image in the collection- not actually moving any file. The image will stay exactly where it is in its original folder and will remain as a thumbnail preview in the Library Grid view.
    Are you having any "mouse" problems that may be changing its actions in LR ?
    Do you see an exclamation mark on any image borders ?
    Let's keep working on this. I am curious to see you find an answer.
    Rob

  • I have Photoshop CS5 and a Epson 3880 . The print setting dialogue box won't open when selecting color output PRINTER MANAGES COLORS

    I have Photoshop CS5 and a Epson 3880 . The print setting dialogue box won't open when selecting color output PRINTER MANAGES COLORS
    It does ope when selecting PHOTOSHOP MANAGES COLOURS . This is first time in 7 year this has happened.
    Any one with ideas/

    What is your screen resolution?
    What operating system?

  • Prevent lower text from moving when accordion panels open

    I tried out the Accordion Panel from Project Seven which is
    really nice and works well. My only issue right now is that I would
    like to prevent the rest of the text outside and below this widget
    within the same column from moving. When any panel opens it causes
    the contents of the entire column to shift down thus causing the
    page to shift down as well.
    I have tried using a new div for the content below the panels
    and also a new table below but can't seem to figure out how to keep
    the content from shifting. Curently I have a table cell nested and
    have tried with CSS to keep it from moving but that is not working
    either.
    Thanks in advance for any help with this.
    Here is the code for the column in question:

    no takers on this one? Does anyone know how I could fix this
    with divs? Is it possible to put this accordion into a separate div
    and create another below it that would not move? Like on the new
    apple site...They have some really awesome accordion style navs on
    the sides that do not throw the rest of the page off when they open
    or close.
    Thanks.

  • Sub vi front panel opens when main vi opens

    When I open my main vi I have one of my sub vi front panels that opens.  I looked in the properties for the sub vi and Show front panel when loaded is NOT checked. Is there something else I need to look at?
    Solved!
    Go to Solution.

    please clarify;
    Q1)
    The sub-VI FP opens when
    You open the top VI but BEFORE you run it
    OR
    The sub-VI FP opens after you start the top level VI
    Q2)
    If the above Q was after you run....
    Is the sub-VI running or paused when it opens?
    If it is puased you may have a breakpoint set in it.
    Ben
    Ben Rayner
    I am currently active on.. MainStream Preppers
    Rayner's Ridge is under construction

  • System preferences will not open when selected from the apple in the upper left corner. My software is 10.6.8

    After upgrading to 10.6.8.... When selecting System preferences from the apple in the upper left corner, no action take place. System preferences will not open.

    After upgrading to 10.6.8.... When selecting System preferences from the apple in the upper left corner, no action take place. System preferences will not open.

  • Accordion Panels Open During Page Load

    All my accordion panels appear open for a second before my page completely loads.  http://home.comcast.net/~steven.kay/
    I found this thread, but am still not clear on the solution given.  http://forums.adobe.com/message/22365#22365
    Thanks.

    Never mind... I downloaded the new js file... (duh)

  • How can I keep iTunes from opening when I insert a CD?

    I have gone through the preferences again and again, and I can't find a way to keep iTunes from opening whenever I insert a CD. iTunes is not my preferred player/encoder, and I don't want it to open unless I tell it to.
    Case in point, I'm converting many CDs to mp3, using an application that gives me the filename format I want (iTunes isn't that flexible enough to do that). It is annoying for iTunes to keep butting in, every time I insert a CD!
    Thanks for any advice.
    L.

    When you first insert a CD your Mac comes up with a box saying
    "You have inserted a CD" (duuh, Apple...)
    Then you choose from a pop-up menu that offers "Open in Finder", "Open in iTunes", etc
    At some point you (or someone) has chosen "Open in iTunes" then checked the little box that says "Make this the default from now on".
    If you go into System Prefs (as already mentioned) you have a choice to reset what you want to do with a blank CD.

  • How to set luma key in FCX 10.1.2?  Luma key adjustments do not open when selecting the  Effects button on the toolbar.

    Using FCPX 10.1.2 and trying to adjust a luma key, when selecting the Effects button on the Toolbar, the adjustments do not appear.  Any suggestions?

    TThe effects controls should be in the inspector. Select the clip in the timeline and post a screen shot of the video inspector.

  • Adobe uninstaller keeps claiming firefox open, when it is not

    I have been having numerous plug in failures in the last few days and have uninstalled on at least 3 occasions today and reinstalled and still the problems Persists. On my latest effort to activate uninstallation, adobe claims that Mozilla is open, when I had deliberately closed it before activating the uninstaller.
    It wasn't and just sits there like a massive unwanted t*rd, no good to man or beast. Running under Windows 7 and there was an Adobe update in the last few days. Seems to me that every time there is an Adobe update the problem resurfaces.
    Does not Adobe checj their stuff. Reloading 11.7 doesn't work, nor 11.8 and 12 seems to be as useless as a bad smell in a phonebox!

    Make sure there is no firefox.exe process running in Task manager, that is also the reason Firefox says it's open but non responding.
    Another option is to download Flash setup, then reboot computer, then start setup without going through Firefox.

  • Using Illustrator CS5 version 15.1 - suddenly my Layers window panel will not open, when selected in the Windows menu drop down the Type Glyphs Window appears. Hitting F7 key also does't work. I rebooted Illustrator and my Mac system. Previusly all has be

    Any thoughts on how to correct this problem?

    Changed workspace from Essentials to Printing and Proofing and Layers panel came on - maybe I goofed and switched workspace - either way problem solved for now. thanks.

Maybe you are looking for