positioning jQuery tooltip

Jeff Pole picture Jeff Pole · Mar 7, 2013 · Viewed 35.8k times · Source

I'm trying to customise the positioning of my tooltips, using jQuery UI Tooltip and this code:

$(".karma").tooltip({
  position: {
    my: "center bottom",
    at: "right top"
  }
});

But whatever I do to "my" and "at" nothing changes. What am I doing wrong?

Here is the link to the jQuery Tooltip API position section

Answer

Dom picture Dom · Mar 7, 2013

There is nothing wrong with your code. However, without seeing your HTML, it is hard to say why it isn't working.

Make sure you have loaded jQueryUI script: here. Also make to wrap your code with $(document).ready(). Let me know if you have any other questions.

DEMO: http://jsfiddle.net/dirtyd77/SLGdE/16/