Give the HTML element the identifier example and related attributes like this:
<p><a href="#" rel="tooltip" title="first tooltip" id="example">hover over me</a>,/p>
In your <head> create a JavaScript <script> element, make sure jQuery is loaded, and then in jQuery add a tooltip to the element with the example id:
<script type="text/javascript"> window.onload = function() { if(!window.jQuery) { alert('jQuery not loaded'); } else { $(document).ready(function(){ $('#example').tooltip({'placement':'top', 'trigger' : 'hover'}); }); } } </script>
This will set up a tooltip when you hover over the #example element. Change top to left , right or bottom to change where the tooltip is placed relative to the element itself.
In case you want in the future, you can also configure popover.
source share