Archive | July, 2013

shiny tool tips from codecanyon

2 Jul

I am using Shiny Tooltips from code canyon.

Unfortunately there was no way to position the tooltips to appear UNDER an anchor.

I added this in tooltip.js, around line 157:

if($this.hasClass("effect_under")) {
top = top + $currentTooltip.innerHeight() + 30 + 20 ;
 $currentTooltip.children(".arrow").css({
 "bottom" : bottom + $currentTooltip.innerHeight()+5 ,
 "border-left" : "20px solid transparent",
 "border-right" : "20px solid transparent",
 "border-bottom" : "5px solid #ADDF79",
 "border-top" : "0px",
 "border-bottom-width" : "20px"
 });
}

So now you can just add the class “effect_under” to your tooltip and the tooltip will appear under the element instead of over it.

The ‘border-bottom’ colour controls the colour, could use a class here instead…