I have incorporated a bootstrap CSS tooltip class that is defined as follows:
.tooltip{display:none;color:#000;text-align:left;}
.tooltip.in{opacity:0.9;z-index:1030;height:auto;display:block}
.tooltip.top{margin-top:-10px;text-align:center}
.tooltip.top{margin-top:-10px;text-align:center}
.tooltip.right{margin-left:10px}
...
I am looking to create variations of the .tooltip
class such as Red, Blue, Orange, and more.
The classes I want to create are:
.red-tooltip{display:none;color:red;text-align:left;}
.red-tooltip.in{opacity:0.9;z-index:1030;height:auto;display:block}
.red-tooltip.top{margin-top:-8px;text-align:center}
.red-tooltip.top{margin-top:-7px;text-align:center}
.red-tooltip.right{margin-left:6px}
.blue-tooltip{display:none;color:blue;text-align:left;}
.blue-tooltip.in{opacity:0.9;z-index:1030;height:auto;display:block}
.blue-tooltip.top{margin-top:-18px;text-align:center}
.blue-tooltip.top{margin-top:-27px;text-align:center}
.blue-tooltip.right{margin-left:6px}
Is there a way to dynamically change the content of .tooltip
using .blue-tooltip
?
Can this be achieved using jQuery?