Show Foundation 5 Tooltip on Click

I have a tooltip through base 5 on the span, for example:

<span data-tooltip aria-haspopup="true" class="has-tip tip-top" title="My tool tip"><i class="fi-pricetag-multiple size-21"></i></span>

It works great. However, what I would like to do is show a tooltip when the user clicks on a range (instead of freezing). Then it closes when you press the close button. I can get halfway when I add data-tooltip-open-event-type="touch" , but it adds two tooltips and it still disappears when I'm in.

Any thoughts would be greatly appreciated. It seems strange that at the base of 5 there would be no kind of pop-out for interactive content.

Thanks!

+5
source share
2 answers

I just needed to understand this for myself, too.

To show:

 Foundation.libs.tooltip.getTip($('#yourId')).show() 

To hide:

 Foundation.libs.tooltip.getTip($('#yourId')).hide() 
+3
source

Ron Marcell found him in a tooltip source :

Foundation.libs.tooltip.showTip (jQuery (".has-tip"));

Taken from How can I make the Foundation tooltip in focus?

0
source

Source: https://habr.com/ru/post/1203872/


All Articles