I have an outer div with an image inside, both have tooltips. Clicking either element performs a different action:
- Clicking the outer
div
, selects the image. - Clicking the inner
img
, opens the image.
I'd like to differentiate the actions, so when the image is hovered, the outer tooltip doesn't show up.
Here's the html:
<div class="outer-tip" title="SELECT image" data-toggle="tooltip">
<a class="inner-tip" title="OPEN image" data-toggle="tooltip">
<img src="...">
</a>
</div>
Here's a FIDDLE with no attempts to fix this: https://jsfiddle.net/qmskzah6/
Here's one where I try z-index: https://jsfiddle.net/qmskzah6/1/
Here's where I move the image outside the div: https://jsfiddle.net/qmskzah6/2/
3 is the closest to what I want, but if you add more images it gets janky, as seen here: https://jsfiddle.net/qmskzah6/3/
I can probably mangle my way to something that works, but I'm wondering if there is a built-in or more elegant way to do this?