CHAPTER 2

image

jQuery Fundamentals

This chapter covers the fundamentals of the jQuery library, including the following topics:

  • How to access jQuery library functionalities
  • Using conditional statements
  • Looping
  • The structure of the Document Object Model (DOM)
  • Commonly used objects in the jQuery library
  • jQuery functions
  • Method chaining

2-1. Setting Up jQuery

As with any other JavaScript library, if you want to access functionalities of the jQuery library, you need to include the jQuery JavaScript file. There are two ways to include the jQuery JavaScript library in an HTML file:

Get jQuery 2 Recipes: A Problem-Solution Approach 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.