C H A P T E R  11

Refactoring the Example: Part I

In the previous chapters, I showed you each functional area in isolation, including how to deal with events, how to manipulate the DOM, and so on. The real power and flexibility of jQuery arises when you combine these features. In this chapter, I am going to demonstrate the combination of features by refactoring the flower shop example document.

All of the changes that I make in this chapter are in the script element. I have not changed the underlying HTML of the example document. As with most jQuery features, there are many different routes to achieving the same result. The approaches I take in this chapter reflect the parts of jQuery that I like the most and the way that I tend to think about ...

Get Pro jQuery now with O’Reilly online learning.

O’Reilly members experience live online training, plus books, videos, and digital content from 200+ publishers.