0

I'm using v-tooltip plugin that needs to work on mobile devices. Naturally, I had to change trigger since it can't trigger hover on a mobile device.

<div
  class="my-tooltip"
  v-tooltip.top="{
    trigger: 'click',
    content: tooltipContent,
  }">
</div>

Is it possible to make tooltip content toggle visibility clicking on the same element (div in my case)?

I thought hideOnTargetClick: true option would make that possible.

AlenD
  • 1
  • 1
  • Both options are working. Can you please elaborate on the issue in detail? – Neha Soni Dec 09 '22 at 10:41
  • @NehaSoni Clicking element doesn't toggle tooltip content visibility, it just stays visible. I want content to hide after clicking element again. – AlenD Dec 09 '22 at 11:14
  • 1
    First thing, your div is invisible to the DOM because nothing is written inside it or it has no minimum styling for it to be visible. Second thing, I tried this code and it is toggling the tooltip by clicking on it. I tried this- `
    Show Tooltip
    `
    – Neha Soni Dec 09 '22 at 11:28
  • @NehaSoni yes you're right, in sandbox it's working like I'd want it to, but in my project it doesn't for some reason. I guess I'll have to figure out this one by myself, thanks. – AlenD Dec 12 '22 at 07:25

0 Answers0