Pop tooltip from top

Description

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   ww  w  .j  av  a 2s .  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





















Home »
  Bootstrap »
    Example »




Accordion
Alert
Auto Complete
Badge
Breadcrum
Button
Carousel
Collapse
Dialog
Dropdown
Form
Icon
Jumbotron
Label
Layout
List
List Group
Media
Navigation Bar
Pager
Page Header
Panel
Paragraph
Pills
Popover
ProgressBar
ScrollSpy
Switch
Tab
Table
Thumnail
Tooltip
Tree
Well