Filtering (Become an expert)

Paging and sorting a table adds interactivity to your site, and can help your users locate specific bits of information. But if they know what they're looking for, rather than having to page or sort, it would be efficient to give them a filter field.

Getting ready

We've come to love it, so stick with the table of movies. This time, underneath the table, add a form field.

Getting ready

How to do it...

  1. You should be able to bang out this particular table code in your sleep, so we'll forego displaying that code. But underneath the table, add a form field as follows:
    <div> Release Year: <input type="text" name="filter" id="filter" /> </div> ...

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.