I have a web application that has a table with a lot of rows. Well...about 50 tall rows.

  • 99.9% of the time, the user will take action on the first or second row.
  • 00.1% of the time, the user will need to go back and take action on a different row.

So I only really need to display the first few rows on page load, and keep the rest available for the sake of history.

I would like to shorten the table somehow. I'm thinking, using jQuery, maybe do something where the first 5 rows are displayed (the rest are hidden), and at the bottom of the table, there is a link to display 5 more rows.

What do you think? How could I achieve this with jQuery?

2 answers


There is a great plugin called DataTables.Net that includes configurable pagination and a great search capability. It works with a standard html table is flexible to setup and tweak as well as lightning fast.

Answered over 9 years ago by David Robbins
o.k.w 2355

There are a few ways using various jQuery plug-ins.

  1. Pagination
  2. Scrollable table

Other interesting jQuery resources:
15 Great jQuery Plugins For Better Table Manipulation
20 Best jQuery Table Plugins

Answered over 9 years ago by o.k.w