React-tooltip: data-event with both 'click' and 'hover'

Created on 1 Feb 2017  路  2Comments  路  Source: wwayne/react-tooltip

After reading the docs, I've realized that if you want to trigger with a hover, you can simply remove the data-event option, like this:

<a data-tip=""><img src={alertIcon} alt="Alert icon" /></a>

And, if I want to trigger with a click option, I can put the data-event option with a click:

<a data-tip="" data-event="click"><img src={alertIcon} alt="Alert icon" /></a>

But I need is both triggering with a hover or a click. I try this:

<a data-tip="" data-event="click hover"><img src={alertIcon} alt="Alert icon" /></a>

and also this:

<a data-tip="" data-event="click mouseenter"><img src={alertIcon} alt="Alert icon" /></a>

but it didn't work. Is there a way for me to do this?

Most helpful comment

this worked:

<a data-tip="" data-event="mouseenter click">

All 2 comments

this worked:

<a data-tip="" data-event="mouseenter click">

@matheusml Really? I just did some test and was writing a comment for you.
In this way, the tooltip won't have float effect, it doesn't matter if you just want a solid effect tooltip.

Was this page helpful?
0 / 5 - 0 ratings