user984621
user984621

Reputation: 48453

Twitter Bootstrap Javascript - how to use only tooltip library?

I have a project that is without Twitter Bootstrap. I would like to use Tooltip, so I downloaded bootstrap-tooltip.js file, put it to the page. (there is included jQuery lib as well).

And this is how I am trying to call tooltip:

$(document).ready(function() {  
    $('.tooltip_link').tooltip();
});
<a href="www.something.com" class="tooltip_link" data-original-title="tooltip text">www.something.com</a>

But the tooltip will never appear, in console log are no JS errors. What am I missing?

Thanks

Upvotes: 2

Views: 4158

Answers (1)

D-side
D-side

Reputation: 9485

data-toggle="tooltip" maybe? I've tried to reproduce what you have here, after inserting this I got it working (JSfiddle right here).

In the docs you've referenced there's the following code:

<a href="#" data-toggle="tooltip" title="first tooltip">hover over me</a>

Upvotes: 1

Related Questions