Bootstrap Tutorial - Pop tooltip from top








The following code shows how to pop tooltip from top.

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>
<style type='text/css'>
body {<!--from w ww  .ja va  2 s .c o  m-->
  padding: 100px;
}
</style>
<script type='text/javascript'>
$(function(){
    $("body").tooltip({
        selector: '[data-toggle="tooltip"]'
    });
    $("a").attr({
        "data-placement": "top",
        "data-toggle": "tooltip",
        "data-original-title": "Tooltip on top"
    });
}); 
</script>
</head>
<body>
  <a rel="next" href="">Hover me</a>
</body>
</html>

Click to view the demo