How would I change the color of a tooltip on JS call?
For example, taking the following:
$('a').tooltip();
And doing something like:
$('a').tooltip().css('background', 'red');
To change the tooltip's color.
How would I change the color of a tooltip on JS call?
For example, taking the following:
$('a').tooltip();
And doing something like:
$('a').tooltip().css('background', 'red');
To change the tooltip's color.
http://getbootstrap.com/javascript/#tooltips
They say you can listen for when an element has one : Look under 'events'
$('a').on('show.bs.tooltip', function () {
/* update - changing the tooltip background css */
$(this).siblings('.tooltip > .tooltip-inner').css("background-color","red");
})
Update :
Or just setting in the CSS ( thanks to Praveen Kumar )
a + .tooltip > .tooltip-inner {background-color: red'}