JSFiddle - React, Tailwind, and code Playground
by jfriend00
HTML
<div class="container disabled">
<a href="www.google.com">Go to Google</a>
</div>
<label>
<input type="checkbox" />Enable link</label>
JavaScript
$(document.body).on('click', '.disabled > a', function (e) {
e.preventDefault();
e.stopPropagation();
alert('should stop working');
});
$('input[type=checkbox]').change(function () {
$('.container').removeClass('disabled');
});