All for Joomla All for Webmasters

Bootstrap Pager

Bootstrap pager is a form of pagination. It is used to create previous and next buttons (links).

The “.pager” class is used within the <ul> element to create the previous / next buttons.


Bootstrap Pager Example

  1.  <!DOCTYPE html>
  2. <html lang=“en”>
  3. <head>
  4.   <title>Bootstrap Pager Example</title>
  5.   <meta charset=“utf-8”>
  6.   <meta name=“viewport” content=“width=device-width, initial-scale=1”>
  7.   <link rel=“stylesheet” href=“http://maxcdn.bootstrapcdn.com/bootstrap/3.3.6/css/bootstrap.min.css”>
  8. </head>
  9. <body>
  10. <div class=“container”>
  11.   <h2>Pager Example</h2>
  12.   <ul class=“pager”>
  13.     <li><a href=“#”>Previous</a></li>
  14.     <li><a href=“#”>Next</a></li>
  15.   </ul>
  16. </div>
  17. <script src=“https://ajax.googleapis.com/ajax/libs/jquery/1.12.0/jquery.min.js”></script>
  18. <script src=“http://maxcdn.bootstrapcdn.com/bootstrap/3.3.6/js/bootstrap.min.js”></script>
  19. </body>
  20. </html>

 


Bootstrap Pager Align Buttons

You can align the previous and next buttons to each side of the page.

The classes “.previous” and “.next” is used to align the buttons previous and next respectively.

See this example:

  1. <!DOCTYPE html>
  2. <html lang=“en”>
  3. <head>
  4.   <title>Bootstrap Example</title>
  5.   <meta charset=“utf-8”>
  6.   <meta name=“viewport” content=“width=device-width, initial-scale=1”>
  7.   <link rel=“stylesheet” href=“http://maxcdn.bootstrapcdn.com/bootstrap/3.3.6/css/bootstrap.min.css”>
  8. </head>
  9. <body>
  10. <div class=“container”>
  11.   <h2>Pager Align Button</h2>
  12.   <ul class=“pager”>
  13.     <li class=“previous”><a href=“#”>Previous</a></li>
  14.     <li class=“next”><a href=“#”>Next</a></li>
  15.   </ul>
  16. </div>
  17. <script src=“https://ajax.googleapis.com/ajax/libs/jquery/1.12.0/jquery.min.js”></script>
  18. <script src=“http://maxcdn.bootstrapcdn.com/bootstrap/3.3.6/js/bootstrap.min.js”></script>
  19. </body>
  20. </html>
PinIt
submit to reddit

Leave a Reply

Top