1

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?

Nijesh Hirpara
  • 1,096
  • 1
  • 12
  • 17
  • could you post the html DOM structure as well, also if possible could you replicate the same on jsfiddle,http://jsfiddle.net – dreamweiver Oct 14 '15 at 06:04

1 Answers1

2

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/

  • Thank you for your answer, It worked for me. I also want start and end rows number of that page as I am using pagination in FooTable. – Nijesh Hirpara Oct 14 '15 at 06:51