O'Reilly logo

Learning jQuery - Fourth Edition by Karl Swedberg, Jonathan Chaffer

Stay ahead with the world's most comprehensive technology and business learning platform.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, tutorials, and more.

Start Free Trial

No credit card required

Chapter 12. Advanced DOM Manipulation

Throughout this book, we have used jQuery's powerful DOM manipulation methods to alter the content of the document. We have now seen several ways in which we can insert new content, move existing content around, or remove content altogether. We also know how to alter the attributes and properties of elements to suit our needs.

In Chapter 5, Manipulating the DOM, we were introduced to these important techniques. In this more advanced chapter, we will cover:

  • Sorting page elements using .append()
  • Attaching custom data to elements
  • Reading HTML5 data attributes
  • Creating elements from JSON data
  • Extending the DOM manipulation system using CSS hooks

Sorting table rows

The majority of the topics we're investigating in this ...

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, interactive tutorials, and more.

Start Free Trial

No credit card required