Is there any way to disable a link using CSS?
I have a class called current-page
and want links with this class to be disabled so that no action occurs
The pointer-events property allows for control over how HTML elements respond to mouse/touch events – including CSS hover/active states, click/tap events in Javascript, and whether or not the cursor is visible.
That's not the only way you disable a Link, but a good CSS way which work in IE10+ and all new browsers:
.current-page {
pointer-events: none;
color: grey;
}
This link is disabled