tags:

views:

264

answers:

2

I'm using the JQuery tooltip plugin - http://docs.jquery.com/Plugins/Tooltip

With the basic implementation:

$(".tooltip").tooltip();

Instead of the tooltip placing itself over the input box it belongs to and tracking with the mouse it is placing itself at the bottom of the page.

The input is basic and is like this:

<input type="text" name="testTooltip" class="tooltip" title="This is the tooltip" />

I've stripped out the CSS in its entirity and the problem remains (there's no inline CSS).

Any ideas as to what could be causing this?

A: 

The Tooltip plugin depends on the dimensions plugin - do you have that loaded?

Greg
Thanks, that was a good shout, I didn't have it loaded. However, I have now loaded it and I am still experiencing the same issue.
bcmcfc
+2  A: 

I had the same problem because I was not including the default styles provided in jquery.tooltip.css:

#tooltip {
    position: absolute;
    z-index: 3000;
    border: 1px solid #111;
    background-color: #eee;
    padding: 5px;
    opacity: 0.85;
}
#tooltip h3, #tooltip div { margin: 0; }

You could either use Firebug with Firefox to check the styles applied to the #tooltip div, or you could check your style sheets to make sure these styles are included. In particular, "position: absolute;" is critical.

Brad Griffith
That's fixed it, thank you.
bcmcfc