Chapter 11

Working with jQuery

What You Will Learn in This Chapter

  • What is jQuery and why you should use it
  • How to get jQuery to use on your pages
  • How jQuery helps you work with the DOM
  • Event handling made easy with jQuery

Wrox.com Code Downloads for this Chapter

You can find the wrox.com code downloads for this chapter at www.wrox.com/remtitle.cgi?isbn=9781118340189 on the Download Code tab. The code is in the Chapter 11 download and individually named according to the names throughout the chapter.

There are many collections of JavaScript code available, called libraries or frameworks, to help you make JavaScript applications. These libraries collect utilities and common features together to make you more efficient when coding JavaScript. jQuery is by far the most popular library in the world for working with JavaScript.

jQuery, released in 2006, offers several advantages over writing your own custom JavaScript:

  • It provides a concise, friendly, human-readable interface to use JavaScript more efficiently.
  • It smooths over the differences in the implementation of JavaScript in the different web browsers. As you’ve learned throughout this book, some browsers implement web standards differently. This is especially true with older versions of Internet Explorer and the JavaScript programming language.
  • There is an incredible community full of tutorials, articles, and free code called plug-ins, which can help you get up and running with jQuery.

This chapter and the next chapter focus ...

Get Beginning HTML and CSS now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.