filipelinhares/fooltips

question/feature_request(enhancement): tooltip on click

Kristinita opened this issue · 1 comments

1. Summary

I couldn’t find how I can do tooltip on the click event to an element without jQuery if I use fooltips.

2. Argumentation

2.1. Common cause

Accessibility.

2.2. Details

If the end-user of my site click to some button, it would be nice to tell him that the action has been taken. It’s not good if the end-user doubts whether he did everything right. Also, it’s desirable that the dialog isn’t obtrusive and distracting.

3. Desired behavior

Currently, I use Tooltipster jQuery tooltips library on my site for these purposes. Example, how it works:

Tooltipster

One tooltip by hover, another tooltip by left mouse button click.

Unfortunately, Tooltipster have a big jQuery dependency and doesn’t work with Zepto and cash — lightweight jQuery alternatives.

Can we get the similar behavior for fooltips?

4. Not helped

I couldn’t find how I can get the desired behavior in:

  1. fooltips description and examples
  2. Google

Thanks.

Hi @Kristinita, sorry the delay to answer. I missed your issue in my notifications.

The only way to solve this is using JS.
You can toggle the class .is-tooltiped or the attribute [data-is-tooltiped].

To change the label text you need some JS as well, but I don't think that jQuery is needed.

If you need any help just let me know, and sorry again for the delay.