DaveG wrote:
Okay, I have a little more, and now it's more important :) Due to the
positioning issues I was having I switched to use bottomTop. This works
fine, *except* when the target element is close to the right side. In
this case the hint gets pushed horizontally out to the center of the
viewport. But only when the cursor is in a position over the target
greater than around half the distance between the object and the browser
edge.
Thus, if the distance from the right edge of the object and the browser
is 20px, then moving the cursor anywhere from around 0-10px on the left
of the target works fine. From 10+px from the left edge of the target,
then the hint is horizontally centered in the browser.
You can see this even on the demo page, by changing adding positionBy to
the right edge demo:
$('a.jt:eq(1)').cluetip({positionBy:'bottomTop',
Fix seems to be to change this line:
$cluetip.css({left: (posX > 0 && defaults.positionBy != 'bottomTop')
? posX : (mouseX + (tipWidth/2) > winWidth) ? winWidth/2 - tipWidth/2 :
Math.max(mouseX - (tipWidth/2),0)});
to:
$cluetip.css({left: (posX > 0 && defaults.positionBy != 'bottomTop')
? posX : (mouseX + (tipWidth/2) > winWidth) ?
linkLeft+linkWidth-tipWidth-lOffset: Math.max(mouseX - (tipWidth/2),0)});
Basically positioning to the right edge of the target object.
~ ~ Dave