JSFiddle - React, Tailwind, and code Playground
by infatti
HTML
<a href="#" class="disabled">Link OFF</a>
<hr />
<a href="#">Link ON</a>
JavaScript
// show something if the link is on
$('a').on( 'click', function(e) {
$( this ).css( "background-color", "red" );
});
// disabled link
$('a.disabled').bind( 'click', function(e) {
e.preventDefault();
$( this ).css( "background-color", "red" );
});
// enable link
$('a').unbind( 'click', function(e) {
$( this ).css( "background-color", "blue" );
});