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.

2. In this example we used the delegate() method, why?<br />

Summary<br />

a. Because the delegate() method executes faster than the bind() or<br />

live() methods<br />

b. Because the delegate() method must be used when binding to custom<br />

events<br />

[ 229 ]<br />

Chapter 8<br />

c. Because the element we need to bind to doesn't exist when the handler for<br />

it is added, and therefore the delegate() or live() methods are our only<br />

options, with delegate() being the more efficient<br />

d. Because we don't need to use the event object<br />

In this chapter, the second <strong>of</strong> our heavily example-based as opposed to theory-based<br />

chapters, we looked at some more common animations that are increasingly found on the<br />

Web. Specifically we looked at the following types <strong>of</strong> animations:<br />

A proximity driven image scroller where the images scrolled in a certain direction,<br />

and at a certain speed, depending on the movements <strong>of</strong> the mouse pointer<br />

Background-position animations, in which we created a continuous header<br />

animation manually with just a few lines <strong>of</strong> code<br />

A text marquee, where a series <strong>of</strong> headlines were grabbed from a live Internet feed<br />

and displayed in a scrolling marquee-style banner<br />

In the next chapter, we'll move to look at some <strong>of</strong> the new pure CSS animations that have<br />

been introduced with CSS3, and how <strong>jQuery</strong> can be used to enhance them and generally<br />

make working with them easier.

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

Saved successfully!

Ooh no, something went wrong!