Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Feature request: Add custom css class to bubble #61

Open
remisture opened this issue Mar 23, 2017 · 1 comment
Open

Feature request: Add custom css class to bubble #61

remisture opened this issue Mar 23, 2017 · 1 comment

Comments

@remisture
Copy link

remisture commented Mar 23, 2017

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;
}
@dtkweb
Copy link

dtkweb commented May 14, 2020

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

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants