Bootstrap Tooltip Using data-toggle With Jquery

 

In tootip popup informative text about the respective element is given,which appears hovering over the element.

 
 
 
<!DOCTYPE html> <html> <head> <title></title> <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.2/jquery.min.js"></script> <script src="http://maxcdn.bootstrapcdn.com/bootstrap/3.3.6/js/bootstrap.min.js"></script> </head> <body> <div class="row col-md-offset-2">When you hover on any button , you will see a different tooltip in different direction according to instructions.</div> <br/> <div class="row"> <div class="col-md-12 col-md-offset-2"> <button type="button" class="btn btn-primary" data-toggle="tooltip" data-placement="bottom" title="Tooltip on left">Tooltip on left</button> <button type="button" class="btn btn-info" data-toggle="tooltip" data-placement="top" title="Tooltip on top">Tooltip on top</button> <button type="button" class="btn btn-danger" data-toggle="tooltip" data-placement="bottom" title="Tooltip on bottom">Tooltip on bottom</button> <button type="button" class="btn btn-success" data-toggle="tooltip" data-placement="right" title="Tooltip on right">Tooltip on right</button> </div> </div> </body> </html> <script type="text/javascript"> $(function () { $('[data-toggle="tooltip"]').tooltip() }) </script>
Output