Popover Placement with attribute - HTML CSS Bootstrap

HTML CSS examples for Bootstrap:Popover

Description

Popover Placement with attribute

Demo Code

ResultView the demo in separate window

<!DOCTYPE html>
<html>
 <head> 
  <meta charset="utf-8"> 
  <meta http-equiv="X-UA-Compatible" content="IE=edge"> 
  <meta name="viewport" content="width=device-width, initial-scale=1"> 
  <title>Example of Bootstrap 3 Popover Placement</title> 
<link rel="stylesheet" href="https://maxcdn.bootstrapcdn.com/bootstrap/3.3.7/css/bootstrap.min.css">
<script src="https://ajax.googleapis.com/ajax/libs/jquery/1.12.4/jquery.min.js"></script>
<script src="https://maxcdn.bootstrapcdn.com/bootstrap/3.3.7/js/bootstrap.min.js"></script>

  <script type="text/javascript">
$(document).ready(function(){
    $('[data-toggle="popover"]').popover();   
});<!--from  w  w w.j  a  va2  s  .  c  o m-->
</script> 
  <style type="text/css">
  .bs-example{
      margin: 150px 50px;
    }
  .popover-demo{
        margin-bottom: 20px;
    }
</style> 
 </head> 
 <body> 
  <div> 
   <div class="popover-demo"> 
    <button type="button" class="btn btn-primary" data-toggle="popover" data-placement="top" title="Popover title" data-content="Default popover">Popover on top</button> 
    <button type="button" class="btn btn-success" data-toggle="popover" data-placement="right" title="Popover title" data-content="Popover on right.">Popover on right</button> 
    <button type="button" class="btn btn-info" data-toggle="popover" data-placement="bottom" title="Popover title" data-content="Popover on bottom.">Popover on bottom</button> 
    <button type="button" class="btn btn-warning" data-toggle="popover" data-placement="left" title="Popover title" data-content="Popover on left.">Popover on left</button> 
   </div> 
   <p><strong>Note:</strong> Click on the buttons to display the popover.</p> 
  </div>   
 </body>
</html>

Related Tutorials