2

What is a good Javascript tooltip library that can do HTML formatting and positioning?

jQuery tooltip plugin is said to be reliable but can it do HTML and positioning (such as bottom-center)?

jQuery Tools's Tooltip can do it except it is only about 90% reliable: Is jQuery Tools Tooltips only about 90% reliable? (and how to fix it?)

This page list 30 of them but doesn't have information such as reliability.

Community
  • 1
  • 1
nonopolarity
  • 146,324
  • 131
  • 460
  • 740

1 Answers1

1

I've always used qTip, it couldn't hurt to check it out: qTip

I always use it with plain text and CSS, but there may be support for embedded HTML, but I couldn't say for sure.

EDIT: It looks like it supports HTML, here is an example putting a YouTube video in a tooltip.

EDIT 2: Here is a further example. Here the content is inline, but it can presumably be acquired through a DOM get:

<script type="text/javascript">
// Create the tooltips only on document load
$(document).ready(function() 
{
   // Match all link elements with href attributes within the content div
   $('#content a[href]').qtip(
   {
      content: '<p>Yo!</p>'
   });
});
</script>

EDIT 3: Looks like they have a version 2 almost out, and it looks slick! LINK

Josh
  • 12,448
  • 10
  • 74
  • 118
  • when you are not sure whether it can do embedded HTML but give it as an answer, all the other people will stop looking at this question – nonopolarity Apr 18 '11 at 15:43
  • @動靜能量: Maybe you could, you know, look into it and then upvote / downvote / comment accordingly. I was merely trying to help you, with what has worked for me in the past. Also, I looked into it for you, and edited my answer. – Josh Apr 18 '11 at 15:47
  • ok, looks like the documentation is here: http://craigsworks.com/projects/qtip/docs/reference/#content but hopefully it is reliable... – nonopolarity Apr 18 '11 at 15:58