02.06.2013 Views

jQuery 1.4 Animation Techniques - Index of

jQuery 1.4 Animation Techniques - Index of

jQuery 1.4 Animation Techniques - Index of

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.

The previous screenshot shows the static element as it is being clipped.<br />

[ 159 ]<br />

Chapter 6<br />

What just happened?<br />

The underlying page has a collection <strong>of</strong> elements on it with the outer container being<br />

styled to look like the television and a couple <strong>of</strong> inner elements, one <strong>of</strong> which is a simple<br />

background which sits behind the static element. Both inner containers use CSS z-index<br />

to sit behind the outer container.<br />

When any part <strong>of</strong> the television is clicked, the static element has the effect applied to it<br />

without any additional configuration, and because the default mode <strong>of</strong> the effect is hide, the<br />

element will be hidden automatically when the effect ends. To see the reverse <strong>of</strong> the effect,<br />

we could hide the static by default and set the mode to show, or we could set the mode to<br />

toggle and have the static alternately show and hide.<br />

The drop effect<br />

The drop effect is used to show an element while sliding it open, or hide it while sliding it<br />

closed. This effect works on both the position and opacity <strong>of</strong> the element it is applied to.

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

Saved successfully!

Ooh no, something went wrong!