how I show that information at my view?
how I show that information at my view?
sobral00
Posts: 6Questions: 2Answers: 0
var table = $('#example').DataTable();
var info = table.page.info();
$('#tableInfo').html(
'Currently showing page '+(info.page+1)+' of '+info.pages+' pages.'
);
This question has an accepted answers - jump to answer
This discussion has been closed.
Answers
Is that code not working for you? Looks like it does here:
http://live.datatables.net/yuwakiba/1/edit
Kevin
take a look, when u change the page, the info page 1 of 6 stay the same
You can use the
draw
event to update the info, like this:http://live.datatables.net/yuwakiba/2/edit
Kevin
I tried to use that draw event at my script, but I couldn't, can you help me please?
my script:
$(document).ready(function () {
Doesn't look like you added the
draw
event to your code. The example I provided shows exactly how to use it:http://live.datatables.net/yuwakiba/2/edit
Kevin