O'Reilly logo

Mastering jQuery by Alex Libby

Stay ahead with the world's most comprehensive technology and business learning platform.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, tutorials, and more.

Start Free Trial

No credit card required

Some examples of using requestAnimationFrame

Up until now, we've seen the theory behind using requestAnimationFrame and covered the typical changes that we might have to make to existing code.

It's a good starting point, but not always easy to get one's head around the concept; it's much easier to see in action! With this in mind, we're going to take a look at a couple of demos, which make use of the API. The first will retrofit support, whilst the second has been built with support already included in the code.

Creating a scrollable effect

For our first demo, we're going to take a look at updating an example of the classic scrollable UI element that can be found on hundreds of sites worldwide. We'll be using the Thumbelina plugin, available from ...

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, interactive tutorials, and more.

Start Free Trial

No credit card required