Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How to flip Twitter Bootstrap's Tooltips

I am using Twitter's Bootstrap to implement tooltips. Currently, the tooltips appear above the link. I would like the tooltip to appear underneath the link. How would I go about doing this?

I am triggering the tooltip and it clearly states "bottom" but it doesn't want to work for me...

<script>$('#home').tooltip('hide bottom')</script>
like image 854
Jonathan Avatar asked Jul 19 '12 19:07

Jonathan


2 Answers

$('#tooltip').tooltip({
    placement : 'left',
    title : 'first tooltip'
});

Use this inside <script> tags, or in a separate JavaScript file.

like image 73
dezman Avatar answered Sep 26 '22 17:09

dezman


Assuming you're using the latest Bootstrap you would use the placement of "bottom". You can do this via the options when you create the tooltip: $("#tt").tooltip({placement: "bottom"}); or via the data attribute on the element: <span data-placement="bottom" ...>tooltip!</span> I believe.

You can find more information on the tooltip in the Bootstrap tooltip section.

like image 39
Joshua Avatar answered Sep 24 '22 17:09

Joshua