Bootstrap Tutorial - Create button with tooltip








The following code shows how to create button with tooltip.

Example

<!DOCTYPE html>
<html>
<head>
<script type='text/javascript'
  src='http://code.jquery.com/jquery-1.9.1.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[ 
$(window).load(function(){<!--  www  . j av a  2 s . c o m-->
$(function() {
    $('.resetPrice').tooltip();
});
});//]]>  
</script>
</head>
<body style='margin:30px'>
  <button title="Reset Pricing" type="button"
    class="btn btn-mini resetPrice" data-placement='bottom'>
    <i class="icon-refresh"></i>
  </button>
</body>
</html>

Click to view the demo