Accordion tabs need to stay open

I'm using an accordion widget for my navigation area at my
wife's site, paxbaby.com. I would like to set the javascript so
that instead of defaulting to all-panels-closed on each loaded
page, it rather keeps open the panel that was open on the previous
page. For instance, if I open panel 3 and click link B, then when I
get to page B, I would like panel 3 to still be open so I can
quickly navigate to page A or C without having to open up the panel
again. I know even less about javascript than I do html, so could
someone help?
Thanks!!

You have to add a little piece of code into each page to make
this happen.
At the bottom of each page you should have a constructor that
creates the accordion. It looks like this.
<script type="text/javascript">
<!--
var Accordion1 = new Spry.Widget.Accordion("Accordion1");
//-->
</script>
The default for Accordion is to open the top most tab first
but you can tell it here that you want a different tab to start
with by adding in the argument for default panel.
like this:
var Accordion1 = new
Spry.Widget.Accordion("Accordion1",{defaultPanel:0});
0 is the first tab so the above line will not change
anything.
var Accordion1 = new
Spry.Widget.Accordion("Accordion1",{defaultPanel:1});
This will make it default to the second tab
var Accordion1 = new
Spry.Widget.Accordion("Accordion1",{defaultPanel:2});
This will make it default to the third tab... and so on.
So you have to go to Page B and change this:
<script type="text/javascript">
<!--
var Accordion1 = new Spry.Widget.Accordion("Accordion1");
//-->
</script>
To be this: (assuming page B is the second tab)
<script type="text/javascript">
<!--
var Accordion1 = new
Spry.Widget.Accordion("Accordion1",{defaultPanel:1});
//-->
</script>
You can check out all the options you can set here
http://labs.adobe.com/technologies/spry/articles/data_api/index.html
You will see "Accordion" in the side there. Click it and you
will see all the available options.

Similar Messages

  • Does the server app need to stay open?

    Probably a dumb question, but do I need to keep the Server.app running at all times?
    Our server is a Mac Mini that doubles as a workstation.  Do I only need the Server app to set up/ start/ manage services, or does it need to be open all the time?

    Server.app is "just" the GUI interface to the services.  You can start or stop Server.app as and when needed.  The services themselves won't be effected.

  • Does Premiere need to stay open after exporting into media encoder

    After using the Export Media option to get my sequence into the Media Encoder, Premiere was closed accidently. This happened after 9 hrs of rendering and according to the encoder estimate I have 20 more hours to go. Is there a reason to restart if it is still running?

    No. You can close PR while AME is running, no problem, no interference.

  • How to keep live chat window from minimizing and stay open while browsing on tab

    while using a live chat window and trying to also access information on the same tab I have it open in or any other tab, the chat window minimizes to the tray and does not reopen automatically. To open you must re access it from the tray and as soon as you search elsewhere for info, it minimizes again! Very annoying when trying to troubleshoot and get help through a chat window. I want the window to stay open so I can access the information I need and chat at the same time.

    When you say chat minimizes to the tray, do you mean the Windows "notification area" or "system tray" down on the Taskbar, or a tray within Firefox itself, for example, created by an add-on and positioned on the Add-on bar (which is a feature which can be added by an add-on)?

  • Hello.. I'm having trouble with my google bookmarks since I upgrdaded to Firefox 3.6.6, when I click on my bookmark tab it opens but then closes again in a matter of seconds. I can't seem to get my list to stay open long enough for me to browse through. A

    Since upgrading to Firefox 3.6.6 my bookmarks will not stay open, when I click on the bookmarks icon on the toolbar my list opens up but then disapears again with in about 10 seconds.... i.e, not enough time for me to chose which site I want to open. I've tried deleting cookies, temp. files and I even tried a complete re-install of Firefox but I'm still getting the same problem.... Any ideas please?
    Thanks.... Jon T.

    I'm having difficulty visualizing what is wrong but try some basic steps first:
    Launch Safari while holding a Shift key - this will start Safari with just your Home page
    If you can see Reset Safari from the Safari menu, try that.
    In addition to downloading and installing Safari again, try reapplying just the Snow Leopard Combo Update: http://support.apple.com/kb/DL1399 There is no need to uninstall Safari first.
    Lastly try deleting Safari's Preferences file: ~/Library/Preferences/com.apple.Safari.plist

  • I actually need help but cannot find the answer. Please.......Lately when open a new tab it does not open with a blank page. I don't want to set my homepage as

    I actually need help but cannot find the answer.
    Please.......Lately when open a new tab it does not open with a blank page. I don't want to set my homepage as blank as when I first open Firefox, it automatically loads my hotmail page. But then if I open other pages I don't get a blank page. Help, please?
    Thank you.
    ''[Personal information removed by moderator. Please read [[Forum and chat rules and guidelines]], thanks.]''

    hello, please refer to [[New Tab Page – show, hide and customize top sites]] in order to switch the feature off.

  • New tabs are not updating the names of the sites they have loaded. When I open a new tab and load a site, the tab simply stays named "New Tab". When I open a link in a new window, it shows "Connecting..." even while its fully loaded.

    New tabs are not updating the names of the sites they have loaded. When I open a new tab and load a site, the tab simply stays named "New Tab". When I open a link in a new window, it shows "Connecting..." even while its fully loaded.

    This issue can be caused by an extension that isn't working properly.
    Start Firefox in <u>[[Safe Mode]]</u> to check if one of the extensions is causing the problem (switch to the DEFAULT theme: Firefox (Tools) > Add-ons > Appearance/Themes).
    * Don't make any changes on the Safe mode start window.
    * https://support.mozilla.com/kb/Safe+Mode
    * [[Troubleshooting extensions and themes]]

  • My tabs will not restore after starting Firefox -- even with the option to restore my tabs and windows is checked in the "options" window. I'm losing tabs from previous sessions that I need to keep open every time I need to restart. Thanks for any advice!

    Is there something else I need to tweak to get rid of this annoyance instead of simply clicking the check box? I'm losing tabs from previous sessions that I need to keep open every time I need to restart. Thanks for any advice!

    Make sure that you do not use Clear Recent History to clear the <i>Browsing History</i> when you close Firefox.
    *https://support.mozilla.com/kb/Clear+Recent+History
    It is possible that there is a problem with the files sessionstore.js and sessionstore.bak in the Firefox Profile Folder.
    Delete the sessionstore.js [2] file and possible sessionstore-##.js [3] files with a number and sessionstore.bak in the Firefox Profile Folder.
    * Help > Troubleshooting Information > Profile Directory: Open Containing Folder
    * http://kb.mozillazine.org/Profile_folder_-_Firefox
    Deleting sessionstore.js will cause App Tabs and Tab Groups and open and closed (undo) tabs to get lost, so you will have to create them again (make a note or bookmark them).
    See also:
    * [1] http://kb.mozillazine.org/Session_Restore
    * [2] http://kb.mozillazine.org/sessionstore.js
    * [3] http://kb.mozillazine.org/Multiple_profile_files_created

  • MBP crashing when multiple browser tabs stay open for too long

    Hello all,
    I have a tendency to open quite a few tabs in chrome and since I don't always have time to read all of them, they stay open for a few days. It seems like after a few days without any reboot and all those tabs open, my MBP becomes unresponsive and then starts crashing... the graphic rendering becomes all confused and unusable. I always have to reboot by hard pressing the power button.
    Any insight on the causes and solution to that issue ?
    Here's a screenshot of the screen when computer starts crashing.

    Please try updating to the most recent version of Firefox.
    How much RAM is on your computer?<br>
    How much open space?
    Please monitor your computer's CPU percentages while using Firefox with these open tabs.
    Please report back soon.

  • Accordion tabs w/panel sub-nav - default open issues

    I have a spry accordion in a left sidebar, and I'm using it as navigation for a slideshow for a website I'm working on. Each of my 5 accordion tabs has a different category of slideshow, with each panel having multiple sub-navigation links that each link to a different slideshow which appears in the main part of the page (to the right of the sidebar). Say it's something like this:
    VENUES (tab)
    (start panel)
    Bayside Restaurant (link)
    Historic Ballroom (link)
    Western Ranch (link)
    (end panel)
    ACTIVITIES (tab)
    (start panel)
    Surfing (link)
    Dancing (link)
    Horse back riding (link)
    (end panel)
    The sub-navigation to each slideshow is activated by simply clicking on the text, which I linked with the "point to file" link tool in the properties menu. 
    Ideally, I'd like to work with one template in Dreamweaver for all pages/slideshows I'm creating, but I'm running into a problem.  I know how to change the default panel in the .js so that a different one appears open when a user first accesses the page, but I can't figure out how to get the default panel to change when the user clicks on a different panel and attempts to use the subnavigation.  The subnavigation works just fine (it takes the user to the correct slideshow), but then the panel snaps shut instead of remaining open on the one the user selected.
    (So, to further explain with the example above, say the user wanted to look at all the links in the "Venues" tab, but the default is to have the "Activities" tab open on arrival.  The "Venues" tab opens just fine on the click, but as soon as the user clicks on, say "Bayside Restaurant," the correct slideshow appears to the right, but then the "Venues" tab snaps shut and the "Activities" tab and its sub-navigation appears open again. The user then has to click on the "Venues" tab again if s/he wants to see the other options and view a different slideshow, rather than simply being able to click on the next link.) 
    I tried making multiple templates, with different default panels open as a solution, but that's not working either. . .for some reason it keeps defaulting back.  
    Does this make sense?  Are there any solutions to this problem? Any help would be much appreciated.
    Thanks!
    Rebekka

    I think I found your problem.  It lies in the Javascript:
    <script language="JavaScript" type="text/javascript">
    var indexAccordion = new Spry.Widget.Accordion("indexAccordion");
    var acc1 = new Spry.Widget.Accordion("indexAccordion", { useFixedPanelHeights: false });
    </script>
    You have essentially duplicated the code in order to accomodate the useFixedPanelHeights.  Consolidate it into single one, and remove the duplicate:
    <script language="JavaScript" type="text/javascript"> var acc1 = new Spry.Widget.Accordion("indexAccordion", { useFixedPanelHeights: false }); </script>
    IE might be having trouble understanding the double instances of the script and is ignoring the latter one.  Just keep the latter one and it might fix it.
    Also, thanks for the tip, but I use Chrome's Developer Tools... it just didn't cross my mind since I've been busy =)

  • Link to specific accordion tab from other page

    Hi all, were working on a site that has recipes page.
    there are few recipes and they are all within an accordion widget.
    when you click on the title ie: Apple pie the tab opens and shows the info.
    My question is : Is it possible to link to that specific accordion tab on the recipes page?
    For example: on the apple page there is a link to the apple pie recipe (which is inside an accordion)
    is that possible?
    yd.

    i meant.
    if you have a page. and on that page there is an accordion with multiple tab (or panel or whatever they are called)
    i would need to make link on another page that link straight to a specific opened tab in the accordion. like an anchor link on another page, but
    have the accordion panel open instead.
    understand
    sorry for the lousy english.
    yd.

  • How do I get windows to stay open upon restart?

    I keep my desktop very orgainized. I want my 2 windows to stay open at all times - my HD and my General folder. All files are in one of these and I have thousands of files (graphic designer). The box is checked to reopen all windows upon restart but they never do. And when I double click the HD icon I have to resize it and put it where I want it on the desktop and then I open my General folder and resize and reposition that. I want them to stay as I set them up, like they always did in 10.8. Any help??

    You posted to the older PPC macs that were built before 2006.
    You could write an applescript app and put it in your login items.
    tell application "Finder"
            open folder "Applications" of startup disk
            select Finder window 1
            set bounds of Finder window 1 to {-3, 44, 691, 545}
            --set position of Finder window 1 to {33, 44}
            set position of Finder window 1 to {60, 45}
            activate
    end tell
    --------------------------------- This is an example.  It usese a different applescript program.  It is an example ----------------
    Here is how to create an Applescript Application. 
    Here is the program:
    https://discussions.apple.com/thread/3033221?tstart=30
    Required:
    Turn on accessability GUI in system preferences.
    Optional:
    Full Key Codes
    http://www.versiontracker.com/dyn/moreinfo/macosx/21215
    youpi or iKey
       youpi and iKey are keystroke remapping programs.
       youpi, the free version, works fairly well for me in Mac OS 10.4 although not officially supported.
    http://www.versiontracker.com/dyn/moreinfo/macosx/11485&vid=75326
       iKey is the paid version
    http://www.scriptsoftware.com/ikey/
    on run
        -- Write a message into the event log.
        -- To see, run this applescript in Sript Editor. Click on Event Log tab at bottom of screen.
        -- Click run.
        log "  --- Starting on " & ((current date) as string) & " --- "
        set fromApp to "Safari"
        set toApp to "TextEdit"
        --- We have arrived.
        say "we are beginning now."
        -- Start your application
        tell application fromApp
            activate
        end tell
        delay 1
        say "copy data to clipboard"
        tell application "System Events"
            tell process fromApp
                keystroke "c" using command down
                delay 2
            end tell
        end tell
        -- Start your application
        tell application toApp
            activate
        end tell
        delay 5
        tell application "System Events"
            tell process fromApp
                --  open file menu
                keystroke return
                keystroke return
                keystroke return
                keystroke "v" using command down
            end tell
        end tell
        say "good news, We are done."
    end run
    The first thing that you need to do is to make the text into an AppleScript program.
    Start the AppleScript Editor
    /Applications/AppleScript/Script Editor.app
    In Snow Leopard it's at: /Applications/Utilities/AppleScript Editor
    Copy the script text to the Applescript editor.
    Save the text to a file as an application and do not check any of the boxes below.
    If you want access to the script from your Script Menu, move the script (the saved script application file) to your
    ~/Library/Scripts folder. You can also drag it to your Dock or make an alias for it on the Desktop.<br><br>
    To debug, run the script within the Applescript Editor. Click on the event log tab at the bottom of the window. Click  on the run icon.  The results from the log statement will be shown at the bottom of the screen.

  • How to Disable Accordion Tab?

    HI. My first visit here...
    Is anyone knows how to disable all accordion tabs and be able
    to open each next from inside previous.
    I know there are some nice samples on how to programatically
    open panels and tabs, but on the same time each of panels or tabs
    can be open by simply clicking on it. I need to restrict user from
    opening tab, unless info is entered inside previous tab content...
    Any advice is appreciated.

    This question has been asked before. Once again, you can NOT do this using pure java. This could be done in Windows using JNI and a keyboard hook or interfacing with the screensaver API perhaps.

  • My IPOD on the Iphone wont stay open to play music!!!

    I recently updated my Iphone 3gS. Now, I try to open the IPOD app to play music and it closes after 3-4 seconds. Help!

    Not sure this is the right fix for you, because for me the iPod app would stay open, but not play music when selected. I read in another thread a solution that worked for me.
    Basically, you need to delete the music from the phone and re-copy from iTunes with 2 syncs. In the music tab, uncheck the boxes in the playlist, artist and genre option, removing all music from the phone, then sync. Then, re-check the desired music to copy back to the phone and sync. Music should play now from the phone.
    I echo the sentiment of another poster that iOS4 really is a disaster. Problem like this should have been solved before release.

  • Cannot save password-screen does not stay open long enough

    Cannot log into company intranet or home voice mail. Asks for a password and cannot save it as the save password dialogue box does not stay open long enough to click on it. Works fine on other locations

    Re: "Lightroom encountered and error when reading from its preview cache and needs to quit"

Maybe you are looking for

  • Entity created by method create_related_entity losing attribute referenz

    Hi all, I created a new Z-relation between the IS-U connection object an an own object (inherited from CL_CRM_GENIL_ABSTR_SO_HANDLER2) to handle customer specific data. It works fine except for one point. Existing data are handled well, I can modify

  • Ibook turned into a pdf

    when all my purchased ibooks went to iCloud one came back as only a PDF! This $20 book WAS a reference book for me, including dozens of notes over a year and a half. NOw ALL the notes are gone, the book is a PDF and I can't create any NEW notes, alte

  • Lack of consistency between folders in Elements 11 Organizer and Finder (mac). Why?

    I use Elements 11 Organizer and Photoshop Elements Editor on a mac (OS X 10.8.2). I experience problems after I made some changes in the Image-folder on the mac and after moving/deleting folders directly in Elements Organizer. Now there are noe consi

  • When i open itunes it will not show home page

    I cannot open the iTunes home page on my PC to manage my new iPadMini.  When I open itunes it goes straight to my music library - originally created for my iPod.

  • Mobililty Group

    dear friends, i have 4 wisms (8 controllers) installed on two distribution switches(6509) and 2 wisms on each chassis and both Distributions have VSL link to each other. i know in one mobility group we can have 24 controllers but i want to know in th