tipso icon indicating copy to clipboard operation
tipso copied to clipboard

Feature request: Add custom css class to bubble

Open remisture opened this issue 7 years ago • 1 comments

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;
}

remisture avatar Mar 23 '17 08:03 remisture

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'
});

dtkweb avatar May 14 '20 11:05 dtkweb