Hello,
First I want to say that I am sort of a beginner with this and I need some help changing the position for a javascript tool tip.
So, this is a script that displays a tooltip when hovering the cursor over a link.
At the moment the tip is displayed beneath the link and I would like to appear above. Here is the positioning code:
Code:
positiontip:function($, tipindex, e){
var anchor=this.anchors[tipindex]
var tooltip=this.tooltips[tipindex]
var scrollLeft=window.pageXOffset? window.pageXOffset : this.iebody.scrollLeft
var scrollTop=window.pageYOffset? window.pageYOffset : this.iebody.scrollTop
var docwidth=(window.innerWidth)? window.innerWidth-15 : htmltooltip.iebody.clientWidth-15
var docheight=(window.innerHeight)? window.innerHeight-18 : htmltooltip.iebody.clientHeight-15
var tipx=anchor.dimensions.offsetx
var tipy=anchor.dimensions.offsety+anchor.dimensions.h
tipx=(tipx+tooltip.dimensions.w-scrollLeft>docwidth)? tipx-tooltip.dimensions.w : tipx //account for right edge
tipy=(tipy+tooltip.dimensions.h-scrollTop>docheight)? tipy-tooltip.dimensions.h-anchor.dimensions.h : tipy //account for bottom edge
$(tooltip).css({left: tipx, top: tipy})
},
I would greatly appreciate any help with this.
Thank you,
Sevastian