JSFiddle - React, Tailwind, and code Playground

by Kees C. Bakker

HTML

<a id="a1" href="http://www.google.com">Google 1</a>
<a id="a2" href="http://www.google.com">Google 2</a>

JavaScript

$('#a1').attr('disabled', 'disabled');

$('a').live('click', function(e) {
    if ($(this).attr('disabled') == 'disabled') {
        e.preventDefault();
    }
});