JSFiddle - React, Tailwind, and code Playground
by Shrikrishna Gupta
HTML
<link rel="stylesheet" href="http://twitter.github.io/bootstrap/assets/css/bootstrap.css">
<a href="http://example.com" class="btn">My Link</a>
CSS
a.disabled { text-decoration:none; color:#bbb; }
JavaScript
$(function() {
jQuery.fn.extend({
disable: function(state) {
return this.each(function() {
var $this = $(this);
$this.toggleClass('disabled', state);
});
}
});
$('a').disable(true);
$('body').on('click', 'a.disabled', function(event) {
event.preventDefault();
});
});