04.02.2013 Views

Spry User Guide - Support - Adobe

Spry User Guide - Support - Adobe

Spry User Guide - Support - Adobe

SHOW MORE
SHOW LESS

You also want an ePaper? Increase the reach of your titles

YUMPU automatically turns print PDFs into web optimized ePapers that Google loves.

Variation on tags used for Collapsible Panel widget structure<br />

In the preceding example, div tags create a nested tag structure for the widget:<br />

Container div<br />

Tab div<br />

Content div<br />

This 2-level, 3-container structure is essential for the Collapsible Panel widget to work properly; the structure,<br />

however, is more important than the actual tags you decide to use. <strong>Spry</strong> reads the structure (not div tags necessarily)<br />

and builds the widget accordingly. As long as the 2-level, 3-container structure is in place, you can use any blocklevel<br />

element to create the widget:<br />

Container div<br />

H3 tag<br />

P tag<br />

SPRY<br />

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

The div tags in the example are flexible and can contain other block-level elements. A p tag (or any other inline tag),<br />

however, cannot contain other block-level elements, so you cannot use it as a container or panel tag for the collapsible<br />

panel.<br />

CSS code for the Collapsible Panel widget<br />

The<strong>Spry</strong>CollapsiblePanel.cssfilecontainstherulesthatstyletheCollapsiblePanelwidget.Youcanedittheserules<br />

tostylethecollapsiblepanel’slookandfeel.ThenamesoftherulesintheCSSfilecorresponddirectlytothenames<br />

of the classes specified in the Collapsible Panel widget’s HTML code.<br />

Note: You can replace style-related class names in the <strong>Spry</strong>CollapsiblePanel.css file and HTML code with class names of<br />

your own. Doing so does not affect the functionality of the widget, as CSS code is not required for widget functionality.<br />

The default functionality for the behaviors classes at the end of the style sheet are defined in the <strong>Spry</strong>CollapsiblePanel.js<br />

JavaScript library file. You can change the default functionality by adding properties and values to the<br />

behavior rules in the style sheet.<br />

The following is the CSS code for the <strong>Spry</strong>CollapsiblePanel.css file:<br />

16

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

Saved successfully!

Ooh no, something went wrong!