UI Deploy

Curated, Short, Web UI Dev we Love.

Filtering Tables

I was recently asked by a friend how you would make a table filterable by using a select box & jQuery - for example "show me films made just in 2014.

Using data attributes this was fairly ease to achieve. Each tr has a data-year attribute which is the value you wish to filter by. This can be anything from a number to a string.

view source

Advertisement