A jQuery Image Slider

Abstract

We’re going to complete the book by building the famed jQuery plug-in: an image slider. This will pull together a lot of parts from the book that you’ve so far only studied in isolation. You’ll use animations to animate your images and events that let the user click through the slider—and end up with a plug-in that’s fully minified and ready for production. You’ll also encounter new functionality that you haven’t studied yet. For example, you’ll hook up your slider to the keyboard so that the user can press the left or right arrows to navigate. And, you’ll further increase the complexity by allowing the user to pause and play the slider, as well as making it automatically animate every 20 seconds. Although you made a slider in Chapter 7, you’ll start this new one from scratch.