title: Limit the number of pages displayed in bootstrap 3 pagination
body: <p>I have various web pages on my website which are using bootstraps (bootstrap 3) pagination but I need to know how to limit the number of pages displayed in it (e.g. display pages 1 to 10 only).</p>
  
  <p>If you then select page 2, page 11 would b displayed and so on.</p>
  
  <p>How do you do this?</p>
  
  <p>I know it will probably be JavaScript/jQuery but any help is appreciated. and if it can be done without having to use JavaScript/jQuery, then all the better.</p>
  
  <p>Below is a screenshot of my pagination.</p>
  
  <p><img src="https://i.stack.imgur.com/MsLrm.png" alt="Current pagination"></p>
  
  <p>As you can see there are 12 pages displayed, I would like pages 11 &amp; 12 to be hidden until page 2 or the next page is selected then pages 11 would be displayed and pages one would be hidden, so on and so on.</p>