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…

Advertisements

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s

%d bloggers like this: