Willy David Jr Willy David Jr - 1 year ago 143
HTML Question

Disable Link Using CSS but Enable Title


.disabledLink {
pointer-events: none;
opacity: 0.6;
cursor: default;

<a href="www.google.com" class="disableLink" title="My Title" />
<span datahover="test">My Link</span>

Unfortunately, title is not appearing when hovering my mouse to the link. Is there a better way to enable title?

Answer Source

.disabled-link {
  pointer-events: none;
<span datahover="test" title="My Title"><a href="www.google.com" class="disabled-link">My Link</a></span>

Change your markup into this. It will work. Instead of targeting tag. I target the span for title. Hope it helps.

Recommended from our users: Dynamic Network Monitoring from WhatsUp Gold from IPSwitch. Free Download