Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Increase horizontal offset of Bootstrap tooltips

Does anyone know if there is an easy way to increase the tooltip offset for Bootstrap tooltips? There's nothing in the docs. The tooltip is obscuring the target area in some cases and preventing clicking.

http://twitter.github.io/bootstrap/javascript.html#tooltips

like image 927
metalaureate Avatar asked Feb 15 '23 22:02

metalaureate


1 Answers

You can try something like this..

$("[data-toggle=tooltip]").hover(function(){
    $('.tooltip').css('top',parseInt($('.tooltip').css('top')) + 15 + 'px')
});

This would increase the vertical offset, but should work for horizontal if you use 'left' instead of 'top'.

Custom tooltip position on Bootply: http://www.bootply.com/59977

like image 184
Zim Avatar answered Feb 27 '23 09:02

Zim