ImageMapster
ImageMapster copied to clipboard
tooltip position fix relative
How can I force tootlips to appear in a fixed relative position? let's say 10px from left and 50px from top of rolledover area? I want them over the area, not outside it... (and I want to ignore the width constraint)
Excellent plug in - thanks
ok so here's the hack method: comment out the function after this line: "// try to figure out the best place for the tooltip" (about 18 lines of code) replace with your hack to work out specific values I used this:
//alert(curY+' '+minY+' '+maxY+' '+bestMinY); use to show returned values - all are relative to window top left
//(bestMinX and Y are used as they are already declared vars)
bestMinX=minX+5;// this places tooltip 5px to right of left edge of area
bestMinY=minY+Math.floor((maxY-minY)/2)-50; // this places top of tooltip 50 px above centre line of area
nest=[bestMinX,bestMinY];
return nest;
hope this helps someone.. I haven't done much testing so it might break something else (someone else can do the clean 'n' tidy method!)