i use two jquery plugins in combination. a text resizer and a tooltip.
after loading the site, the tooltip is at the correct position. when i resize the text, the tooltip keeps the first position. so it’s higher above the desired position.
the tooltip must be refreshed after clicking the text resizer? how can i do that?
the text resize function:
jQuery( "#textsizer-classnames a" ).textresizer({
target: "#maincontent",
type: "cssClass",
sizes: [ "small-text", "medium-text", "large-text" ],
selectedIndex: 0
});
the tooltip function:
$('.tTip').betterTooltip({speed: 350, delay: 700});
I think it is not possible without rewriting some parts of the betterTooltip plugin. Actually when you run
betterTooltip()it stores the initial location and size af the object that will have a tooltip. It would be better to check the position and size of the elements on every hover event.This problem also occures with initially hidden elements, and one of the commenters solved it, here is the link for the solution: http://net.tutsplus.com/tutorials/javascript-ajax/build-a-better-tooltip-with-jquery-awesomeness/comment-page-3/#comment-396215
You should extend the above solution with the size checking too.
If you need further help, add a comment!