0

I found a lot of questions about Bootstrap 3 Tooltips but no one of them is resolving my issue.

Here is my code:

http://jsfiddle.net/qa22N/

$('#mytooltip').tooltip()

The code above is not working, see the Fiddle example.

What am I doing wrong? I don't know why the tooltip is not showing at all. Thanks for any help.

pwnjack
  • 1,096
  • 3
  • 17
  • 26

1 Answers1

4

It is working, it is just showing above the link, and so is appearing off screen. Adding data-placement="auto" causes the tooltip to move to a position where it would be on screen, solving the problem.

Working fork of your code: http://jsfiddle.net/designingsean/qa22N/1/

Sean Ryan
  • 6,048
  • 2
  • 25
  • 23
  • Thanks Sean, last question, it's better to use "data-original-title" or "title"? – pwnjack Nov 12 '13 at 11:14
  • 1
    Well, using `title` will give you a fallback if the javascript fails to load for whatever reason. It should give you the browser's built-in hover, a la alt tags on images. So if you want the info in the tooltip to always be accessible, then I would go with `title`. If not then go with `data-title`. – Sean Ryan Nov 12 '13 at 12:49
  • Also, note that both `data-title` and `data-original-title` work. I have no idea why they included both. – Sean Ryan Nov 12 '13 at 12:49