tipso
tipso copied to clipboard
Feature request: Add custom css class to bubble
Will make it easier to pre-define "modes".
if (obj.settings.cssClass) {
tipso_bubble.addClass(obj.settings.cssClass);
}
<div data-tipso-cssClass="error" class="tipso" />
$('.tipso').tipso({
cssClass: 'error'
});
.tipso_bubble.error {
background: red;
color: white;
}
.tipso_bubble.error .tipso_arrow {
border-color: transparent transparent red;
}
show: function() {
var tipso_bubble = this.tooltip(),
obj = this,
$win = this.win;
replace to:
show: function() {
var tipso_bubble = this.tooltip(),
obj = this,
$win = this.win;
if (obj.settings.cssClass) {
tipso_bubble.addClass(obj.settings.cssClass);
}
and use:
$('.tipso').tipso({
cssClass: 'error'
});