Scroll To Top

Enter a query to search our site. Note that you can use "*" and "?" as wildcards. Enclosing more than one word in double quotes ("CSS Layout") will search for the exact phrase.

PVII Knowledge Base

1. Select a product ...
2. Select category ...
3. Search the Knowledge Base...

Question #214

Is there a way to have an Accordion Panel Magic 1 system open all of the panels when the page loads?

The Answer

Prepared Jul. 2007 by Gerry Jacobsen, PVII

Note: This feature is built into Accordion Panel Magic 2

You can have the Accordion Panel Magic 1 system (APM) start with all of the panels open by applying a simple code tweak as shown in this Example Page.

Here's how:

1. Open the Accordion Panel scripts file, locate the last few lines of the P7_initAB() function, around line 92:

 }
 p7AB=true;
 P7_ABurl();
 P7_ABauto();
}

2. Add this new line:

 P7_ABopen('1_a');

right after the P7_ABauto(); line so that it now looks like this:

 }
 p7AB=true;
 P7_ABurl();
 P7_ABauto();
 P7_ABopen('1_a');
}

3. Save the file.

All panels in Accordion Panel component 1 will now be in the open state when the page loads. If you have more than one components on the page you simply change the "1" in the P7_ABopen('1_a') line to reflect the number of component you wish to start with all panels open.

This tweak will work best when you choose the "Allow Multiple Open Panels" option in the Accordion Panel interface.

Note: The above tweak is based on the APM version 1.0.4.

Back to the questions list