04.02.2013 Views

Spry User Guide - Support - Adobe

Spry User Guide - Support - Adobe

Spry User Guide - Support - Adobe

SHOW MORE
SHOW LESS

Create successful ePaper yourself

Turn your PDF publications into a flip-book with our unique Google optimized e-Paper software.

For example, create a folder called <strong>Spry</strong>Assets in the root folder of your web site, and move the <strong>Spry</strong>Accordion.js file<br />

to it. The <strong>Spry</strong>Accordion.js file contains all of the information necessary for making the Accordion widget interactive.<br />

2 Locate the <strong>Spry</strong>Accordion.css file and add it to your web site. You might choose to add it to the main directory, a<br />

<strong>Spry</strong>Assets directory, or to a CSS directory if you have one.<br />

3 Open the web page to add the Accordion widget to and link the <strong>Spry</strong>Accordion.js file to the page by inserting the<br />

following script tag in the page’s head tag:<br />

<br />

Make sure that the file path to the <strong>Spry</strong>Accordion.js file is correct. This path varies depending on where you’ve placed<br />

the file in your web site.<br />

4 Link the <strong>Spry</strong>Accordion.css file to your web page by inserting the following link tag in the page’s head tag:<br />

<br />

Make sure that the file path to the <strong>Spry</strong>Accordion.css file is correct. This path varies depending on where you’ve<br />

placed the file in your web site.<br />

5 Add the accordion to your web page by inserting the following div tag where you want the accordion to appear<br />

on the page:<br />

<br />

<br />

6 Add panels to the accordion by inserting tags inside the tag, as follows:<br />

<br />

<br />

<br />

<br />

<br />

<br />

The preceding code adds two panels to the accordion. You can add unlimited panels.<br />

7 To add tabs to the panels, insert div class="AccordionPanelTab" tags inside each div class="Accordion-<br />

Panel" tag, as follows:<br />

<br />

Panel 1 Title<br />

<br />

8 To add a content area to the panels, insert div class="AccordionPanelContent" tags in each div<br />

class="AccordionPanel" tag, as follows:<br />

<br />

Panel 1 Title<br />

Panel 1 Content<br />

<br />

SPRY<br />

<strong>User</strong> <strong>Guide</strong><br />

Insert the content between the opening and closing AccordionPanelContent tags. For example, Panel 1<br />

Content, as in the preceding example. The content can be any valid HTML code, including HTML form elements.<br />

9 To initialize the <strong>Spry</strong> accordion object, insert the following script block after the HTML code for the Accordion<br />

widget:<br />

8

Hooray! Your file is uploaded and ready to be published.

Saved successfully!

Ooh no, something went wrong!