I need to display a tooltip on a disabled button and remove it on an enabled button. Currently, it works in reverse.
What is the best way to invert this behaviour?>
Working code for Bootstrap 3.3.6
Javascript:
$('body').tooltip({ selector: '[data-toggle="tooltip"]' }); $(".btn").click(function(e) { if ($(this).hasClass("disabled")){ e.preventDefault(); } });
CSS:
a.btn.disabled, fieldset[disabled] a.btn { pointer-events: auto; }