I'm going mad here.
I've got the following HTML:
<a href="#" rel="tooltip" title="A nice tooltip">test</a>
And the Bootstrap style tooltip refuses to display, just a normal tooltip.
I've got bootstrap.css working just fine, and I can see the classes in there
I've got all of the relevant JS files at the end of my HTML file:
<script src="bootstrap/js/jquery.js"></script>
<script src="bootstrap/js/bootstrap-alert.js"></script>
<script src="bootstrap/js/bootstrap-modal.js"></script>
<script src="bootstrap/js/bootstrap-transition.js"></script>
<script src="bootstrap/js/bootstrap-tooltip.js"></script>
I've looked at the source of Bootstrap's example and cannot see anything that initiates the tooltip anywhere in there. So I'm guessing it should just work, or am I missing something vital here?
I've got modals and alerts and other things working just fine, so I'm not a total moron ;)
Thanks for any help!
you can use Popper.js
And call tooltip function:
If you are creating your html that contains the tooltip with javascript, and then inserting it into the document, you have to activate the popover/tooltip AFTER you have inserted the html into the document, not on document load...
You dont need all js files separately
Just use the following files if you are going to use all bootstrap functions:
both of them can be found in http://twitter.github.com
and finally
-Latest version of jquery.js
For Glyphicons you need the image
glyphicons-halfings.png and/or glyphicons-halfings-white.png(white coloured images)
which u need to upload inside /img/ folder of u r website (or) store it where ever u want but change the folder directory inside the bootstrap.css
For tooltip u need the following script inside your
<head> </head>
tagThat's it...
This is the simplest way. Just put this before
</body>
:Check out the examples given in the Bootstrap's documentation about tooltips.
For example:
I had a similar issue and especially if you are running in a button container like a vertical button container. In that case you have to set the container as the 'body'
example
I know this is an old question, but since I had this problem with the new release of bootstrap and its not clear on the website, here is how you enable the tooltip.
give your element a class like "tooltip-test"
then activate this class in your javascript tag: