I am having an anchor tag, which should not be clicked so i have added pointer events none.i have a title attribute on the anchor tag need to be shown while hovering. pointer-event:none prevents the title tag from showing up.Is there a way to have both pointer-events:none and title showing up.
a{
pointer-events:none;
}
<a href="https://stackoverflow.com/" title="Some Sample Title"> Sample Link </a>
No, pointer-events: none
is pretty encompassing in that any eventType that is associated with the mouse. You could wrap a <span>
around the anchor and assign the title
to that instead. It's ugly but valid.
a {
pointer-events: none;
}
<span title='I am wrapped around this anchor'>
<a href="https://stackoverflow.com/" title="Some Sample Title">Sample Link</a>
</span>
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With