1

I am following the documentation as closely as I can, but I can't get the tooltips working. What am I doing wrong?

I've tried a lot of things. Here is some of what I've tried in a sample file.

http://anunexpectacle.com/micros/

I'm pretty desperate now. Please sort me out.

1 Answer 1

2

It looks like your selector is wrong. When I used this, the tooltips appeared:

$("[rel=tooltip]").tooltip();

Note that $("tooltip") looks for HTML tags like <tooltip>something</tooltip>, but in this case (I guess) you mean to target the links, which have the attribute rel=tooltip.

7
  • I've tried your suggestion in this new file to no avail: anunexpectacle.com/micros/index2.html The selector I've used is copied direct from the docs. Any other thoughts?
    – KindOfGuy
    Oct 6, 2012 at 17:21
  • @KindOfGuy bizarre ... I copied your files locally, and the tooltips work for me in Chrome. Your page is showing this Unexpected token ILLEGAL error message that I don't understand, which I suppose may be the cause. stackoverflow.com/questions/12719859/…
    – McGarnagle
    Oct 6, 2012 at 17:34
  • 1
    @KindOfGuy there's something going on with your file's encoding. I'd try copy/pasting the whole thing to a new file, and making sure to save it with UTF-8 encoding.
    – McGarnagle
    Oct 6, 2012 at 17:36
  • I got rid of that: anunexpectacle.com/micros/index3.html Still doesn't work for me, nor locally, nor online. Thanks for trying. Any more thoughts?
    – KindOfGuy
    Oct 6, 2012 at 18:41
  • @KindOfGuy the error is fixed, but now the selector is back to $("tooltip") -- try changing back to my suggestion above.
    – McGarnagle
    Oct 6, 2012 at 18:45

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.