title: jQuery dataTables page info
body: <p>Reference: <a href="http://datatables.net/reference/api/page.info()" rel="nofollow">http://datatables.net/reference/api/page.info()</a></p>
  
  <p>I am trying to acquire the current pagination information for an ajax POST generated jQuery DataTable.</p>
  
  <p>Using provided function .page.info(), it is returning with all zeros for pages and page, even though the Table has multiple pages.</p>
  
  <p>My goal is to provide pagination info next to Pagination type "simple",</p>
  
  <p><strong>Page [Current Page Number] of [Total Page Count] [&lt;|>]</strong>.</p>
  
  <p>This is the resulting output:</p>
  
  <pre class="lang-js prettyprint-override"><code>Object {
      end: 0
      length: 10
      page: 0
      pages: 0
      recordsDisplay: 0
      recordsTotal: 0
      start: 0
  }
  </code></pre>
  
  <p>And this is the jQuery DataTable code:</p>
  
  <pre class="lang-js prettyprint-override"><code>var oSegmentsDatatable = $('table#segments-datatable').DataTable({
      ajax: {
          type: "POST",
          url: urlSegmentsDatatable,
          data: {'advertiser_id':&lt;?=$advertiser_id?&gt;},
          error: function (jqXHR, textStatus, errorThrown) {
  
          }
      sDom: 'p&lt;"H"f&gt;t&lt;"F"lr&gt;',
      bProcessing: false,
      bServerSide: true,
      responsive: true,
      bFilter:  true,
      sPaginationType: "simple",
      aaSorting: [[8,'desc']],
      bAutoWidth: false,
      aoColumns : [
          { 'sWidth': '25%' }, // 0
          { 'sWidth': '3%' }, // 1
          { 'sWidth': '3%' }, // 2
          { 'sWidth': '3%' }, // 3
          { 'sWidth': '3%' }, // 4
          { 'sWidth': '5%' }, // 5
          { 'sWidth': '5%' }, // 6
          { 'sWidth': '5%' }, // 7
          { 'sWidth': '10%' } // 8
      ],
  
      columnDefs: [{
          targets: "no-sort",
          orderable: false
      }]
  });
  
  var info = oSegmentsDatatable.page.info();
  console.log(info);
  </code></pre>