Nijesh Hirpara
Nijesh Hirpara

Reputation: 1106

How to display total number of rows in FooTable?

I am pushing data into FooTable via Ajax. I refresh all rows on each AJAX call by using this code,

$('.footable tbody').html(outData[1]).trigger('footable_redraw');

I want to show total number of rows in the table, as well as start and end rows in the current page in footer area.

For example,

View 1-30 of 90631 Products

I checked documentation of FooTable, but didn't found anything relevant.

I got the total number of length by using this code,

$("tbody tr").length

How can I get start and end row numbers as I am using pagination in Footable?

Upvotes: 1

Views: 2683

Answers (1)

Roman Romanovsky
Roman Romanovsky

Reputation: 578

You can count number of tr (which means row) tags in your table body :

$("tbody tr").length

Here example : http://jsfiddle.net/RomanGroovyDev/5Ntye/18/

Upvotes: 2

Related Questions