They are utilizing this particular code to achieve the desired outcome, which is different from the single line of code you provided.
<!DOCTYPE html>
<html lang="en>
<head>
<title>Bootstrap Example</title>
<meta charset="utf-8>
<meta name="viewport" content="width=device-width, initial-scale=1">
<link rel="stylesheet" href="http://maxcdn.bootstrapcdn.com/bootstrap/3.3.6/css/bootstrap.min.css">
<script src="https://ajax.googleapis.com/ajax/libs/jquery/1.12.0/jquery.min.js"></script>
<script src="http://maxcdn.bootstrapcdn.com/bootstrap/3.3.6/js/bootstrap.min.js"></script>
</head>
<body>
<div class="container">
<a type="button" class="btn btn-default" data-toggle="tooltip" data-placement="left" title="Tooltip on left">Tooltip on left</a>
</div>
<script>$(function () {
$('[data-toggle="tooltip"]').tooltip()
})
</script>
</body>
</html>
It is crucial to pay attention to this section:
<script>
$(document).ready(function(){
$('[data-toggle="tooltip"]').tooltip();
});
</script>
Additionally, make sure to incorporate this API:
<script src="http://maxcdn.bootstrapcdn.com/bootstrap/3.3.6/js/bootstrap.min.js"></script>
After investigating, I discovered that removing the specified JavaScript code results in an outcome similar to yours. Include the aforementioned script element in your code, along with linking the bootstrap js library and Bootstrap-combined.css.
To place the tooltip above the text, use this code:
<a href="#" data-toggle="tooltip" data-placement="top" title="Hooray!">Hover</a>
By following this method, you will achieve the same result as indicated there.
For further information, refer to this link
https://i.sstatic.net/jEWhm.png