I have a tooltip that activates(shows) when the target text is hovered over. For touch devices, the person can click the target text and the tooltip will display, then when they touch the TOOLTIP(not target text) the tooltip hides. But I want the person with the mouse to be able to select the text in the tooltip, the problem is that when they click on the tooltip, it hides, which is the functionality for the touch devices.
So, for computers(with a mouse) I want the tooltip to be able to be clicked without it hiding, but on touch devices I want the tooltip to hide when it’s clicked to make it easier for the user. Hope that makes sense.
What’s the best way to go about this? Is there a way for me to say “when touched, do this, but when clicked(with a mouse), do that”?
This is probably overkill, but these are some jQuery extensions I use to facilitate touch events across browsers:
Basically you want to bind to
touchstart,touchmove, andtouchend. Or maybe justtouchstartfor what you are doing.