How to change the Page # in DataTables in the Pagination bar?
How to change the Page # in DataTables in the Pagination bar?
Hi. I've posted this question in StackOverFlow too https://stackoverflow.com/questions/44789753/how-to-change-the-page-in-datatables-in-the-pagination-bar.
What I want to know is how to modify the Page# on the pagination bar. Instead of 1 2 I want to show a text "Page" 1(first page#) text "of" 10 (total number of pages)
Page 1 of 10
So far I've used these properties in my constructor
$(document).ready(function() {
$('#esignTable').DataTable({"pageLength":5, "pagingType":"full_numbers", "sDom": '<"top"flp>rt<"bottom"i><"clear">', "oLanguage": {
"sEmptyTable": " ",
"oPaginate": {
"sNext": '<img src="../images/integration/SlowRight.jpg">',
"sPrevious": '<img src="../images/integration/SlowLeft.jpg">',
"sFirst": '<img src="../images/integration/FastLeft.jpg">',
"sLast": '<img src="../images/integration/FastRight.jpg">',
}
}
});
});
Edited by Allan - Syntax highlighting. Details on how to highlight code using markdown can be found in this guide.
This question has an accepted answers - jump to answer
Answers
Use the
language.info
option. You would set it to be something likePage _PAGE_ of _PAGES_
.Allan
I did that and it is working fine just like JQGrid input field. Thanks Allan.