Bootstrap Tutorial - Use single icon to generate popover








The following code shows how to use single icon to generate popover.

Example

<!DOCTYPE html>
<html>
<head>
<script type='text/javascript'
  src='http://code.jquery.com/jquery-1.10.1.js'></script>
<script type='text/javascript'
  src="http://netdna.bootstrapcdn.com/bootstrap/3.0.0/js/bootstrap.min.js"></script>
<link rel="stylesheet" type="text/css"
  href="http://netdna.bootstrapcdn.com/twitter-bootstrap/2.3.0/css/bootstrap-combined.min.css">
<script type='text/javascript'>//<![CDATA[ 
$(function(){<!--from  w ww .j  a  v a  2s  .c  o  m-->
// prevents jumping
$("a.pop-me-over").on("click", function (e) {
    e.preventDefault();
    return true;
});
$(".pop-me-over").popover();
});//]]>  
</script>
</head>
<body style='margin:300px'>
<p><a class="pop-me-over" data-toggle="popover" data-placement="top"
      data-content="This is some extra information."
      data-title="Information"><i class="icon-info-sign"></i></a> 
</p>
<i class="pop-me-over icon-info-sign" data-toggle="popover"
      data-placement="top" data-content="This is some extra information."
      data-title="Information"></i> 
</body>
</html>

Click to view the demo