Chapter 1. Instant jQuery 2.0 Table Manipulation How-to

In order to write effective jQuery, it's important to write well marked-up HTML. Browsers are generally forgiving, and will render most markup to the best of their abilities. But jQuery, which has been referred to as the "find-something/do-something" framework, accomplishes the "find-something" part with its powerful selector engine (see http://api.jquery.com/cateogry/selectors/).

For example, including <thead>, <tbody>, and <tfoot> tags in your table give jQuery direct access to those DOM elements. Consider the following table markup:

<table id="myTable"> <thead> <tr><th>Column 1</th></tr> <tr><th>Column 2</th></tr> </thead> <tfoot> <tr><td colspan="2">&copy; Charlie Griefer. So there!</td></tr> ...

Get Instant jQuery 2.0 Table Manipulation How-to 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.