I have been working on a simple tool tip (see fiddle below), but am having some positioning problems. I would like the tip to appear centered and above the link that is clicked. At the moment the top left corner is positioned at the mouse click. I tried to offset this position by half of the tooltip but to no success.
Share
Check out the changes at http://jsfiddle.net/CBf4C/3/
You need to get the position of the clicked element (use
.position()), get the dimensions of the tooltip with.outerWidth()and.outerHeight()and then calculate based on these..the actual code is