Bootstrap Tutorial - Add tooltip to flag icon








The following code shows how to add tooltip to flag icon.

Example

<!DOCTYPE html>
<html>
<head>
<script type='text/javascript'
  src='http://code.jquery.com/jquery-git.js'></script>
<link rel="stylesheet" type="text/css"
  href="http://netdna.bootstrapcdn.com/twitter-bootstrap/2.3.2/css/bootstrap-combined.min.css">
<script type='text/javascript'
  src="http://netdna.bootstrapcdn.com/twitter-bootstrap/2.3.2/js/bootstrap.min.js"></script>
<script type='text/javascript'>//<![CDATA[ 
$(function(){<!--   w  ww . j  a  v  a2s  .  c o m-->
    $('[rel=tooltip]').tooltip({
        placement: 'bottom'
    });
});//]]>  
</script>
</head>
<body>
  <a id="flag"> <i class="icon-flag" data-toggle="tooltip"
    rel="tooltip" title="Flag"></i>
  </a>
</body>
</html>

Click to view the demo