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.

Download from Wow! eBook <br />

Custom <strong>Animation</strong>s<br />

Save the file and preview it in your browser. We should find that we can click on either image<br />

and it will expand to show a full-sized version <strong>of</strong> the image, with the first image expanding to<br />

the right, and the second expanding to the left:<br />

In the previous screenshot we see the first image as it expands to its full size.<br />

Pop quiz – creating expanding images<br />

1. In this example, we used a different format for the arguments passed to the<br />

animate() method, what format did the arguments take?<br />

a. Two arrays where the first array contains selectors for the elements to animate,<br />

and the second contains the duration, easing, and specialEasing strings,<br />

and a callback function<br />

b. A single object containing the style properties to animate, duration, easing, and<br />

specialEasing strings, and step and complete callback functions<br />

c. A function which must return the style properties to animate, the duration and<br />

easing strings, and a callback function<br />

[ 120 ]

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

Saved successfully!

Ooh no, something went wrong!