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

Create successful ePaper yourself

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

The previous screenshot shows the blind in its fully-open state.<br />

[ 157 ]<br />

Chapter 6<br />

What just happened?<br />

We set a click handler on the outer container which calls the toggle() method on the<br />

inner element. In the CSS we set the inner element to be hidden initially, so the first time<br />

the container element is clicked, the inner element will be shown.<br />

The clip effect<br />

The clip effect causes the element it is called upon to reduce in size vertically or horizontally<br />

until it disappears.<br />

Configuration options<br />

The configuration options we have at our disposal when using the clip effect allow us to<br />

control the direction in which the animation proceeds, and whether the element is shown<br />

or hidden:<br />

Option Default Usage<br />

direction "vertical" Sets the axis along which the element animates.<br />

mode "hide" Configures whether the element is hidden or shown. Other<br />

possible values are show, toggle, and effect.

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

Saved successfully!

Ooh no, something went wrong!