Chapter 1. Document Object Model Manipulation

In this chapter, we will cover:

  • Selecting elements
  • Finding and selecting sibling elements
  • Creating DOM elements
  • Inserting content into an element
  • Modifying the DOM element properties
  • Adding and removing CSS classes to dynamically change their style
  • Enabling and disabling buttons by changing their properties
  • Updating an image within a page
  • Populating list elements
  • Understanding pagination
  • Removing DOM elements
  • Re-using DOM elements

Introduction

This chapter looks at the fundamental principles of jQuery—finding, selecting, and manipulating DOM elements. jQuery makes it easy for JavaScript developers to select single or multiple HTML page elements using a variety of methods.

Once the developer has selected these elements, ...

Get jQuery 2.0 Development Cookbook 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.