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.

Usingthistechnique,theCSSrulehidesthe<strong>Spry</strong>regionsmarkedwiththisclasswhenthepageloads.Whenthe<strong>Spry</strong><br />

data is finished processing, <strong>Spry</strong> strips off the <strong>Spry</strong>HiddenRegion class and the finished <strong>Spry</strong> content appears.<br />

An alternative way to hide just the data references, as opposed to the whole tag, is to use the spry:content attribute<br />

as a substitute for a data reference. Because the data reference is the value of the spry:content attribute, it is not<br />

visible when the page loads.<br />

The following example hides a data reference with a spry:content attribute on an element:<br />

<br />

<br />

Hello my name is {firstname}.<br />

<br />

<br />

Hello my name is .<br />

<br />

The spry:content attribute replaces the entire contents of the div tag with the value of the attribute. In this case,<br />

thethevalueof{firstname} is inserted into the empty span tag.Theresultisthesame,onlyinthiscasethereisno<br />

visible data reference.<br />

Behavior attributes<br />

You can place behavior attributes on elements within a dynamic region to automatically enable common behaviors<br />

that would ordinarily require some manual programming.<br />

spry:hover<br />

The spry:hover attribute places a class name on an element whenever the mouse cursor enters the element, and<br />

removes that class name as the cursor exits the element.<br />

The value for the spry:hover attribute is the name of the class to put on the element whenever the mouse enters or<br />

exits the element.<br />

SPRY<br />

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

137

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

Saved successfully!

Ooh no, something went wrong!