Korra Korra -4 years ago 226
Javascript Question

How to change the color of a Bootstrap popover in JavaScript

I have this JS code to bring up a popover:

$('a').popover({content: 'Popover text', title: 'Popover'});
$('a').popover('show');


I would like to change the attributes, for example, I would like the color of the popover to be a light yellow. Is there a way I can do this in the JS code itself? Perhaps in the template option?

Answer Source

You can do this with CSS by using the .popover, .popover-title, and .popover-content classes.

.popover-title{
    background: #ffff99;
}
Recommended from our users: Dynamic Network Monitoring from WhatsUp Gold from IPSwitch. Free Download