title: twbs-pagination Start page option is incorrect
body: <p>I need some help. I get error when my page count is 0 "Start page option is incorrect"</p>
  
  <p>here is my code</p>
  
  <pre><code>$rows = $employee-&gt;countData($param);
  $per_page = 5;
  $pages = ceil( $rows / $per_page );
  </code></pre>
  
  <p>the value of $pages is 0</p>
  
  <p>This is how I get the pages by using jquery.ajax</p>
  
  <pre><code>var total_pages = data;
  var logid = '30';
  
  $('#pagination')
    .empty()
    .removeData("twbs-pagination")
    .unbind("page");
  
  $('#pagination').twbsPagination({
  
    totalPages: total_pages,
    visiblePages: 7,
    onPageClick: function (event, page) {
        $('#container').load('load_data.php',{page:page,id:logid});
    }
  });
  
  $('#container').load('load_data.php',{id:logid});
  </code></pre>
  
  <p>here is my load_data.php</p>
  
  <pre><code>$page = isset($_POST['page']) ? (int) $_POST['page'] : 1 ;
  
  $id = $_POST['id'];
  
  $per_page = 5;
  
  if($page == 0)
      $start = 0;
  else
      $start = ( $page - 1 ) * $per_page;
  
  
  $result = $emp-&gt;getPainateData($id,$start,$per_page);
  </code></pre>
  
  <p>Thank you in advance.</p>