jquerybootstrap-4tooltippopper.jsjquery-ui-tooltip

Tooltip is not hiding, if we disabled the button on click


Tooltip is not hiding, if we disabled the button on click

$("#btn").on("click", function () {
  $(this).prop("disabled", true);
});

here is an running example. https://jsfiddle.net/JitanGupta/e8fjd0nL/

I am using basic setup with bootstrap 4


Solution

  • use hide or show :

            $("#btn").on("click", function () {
                $(this).prop("disabled", true);
                 $('[data-toggle="tooltip"]').tooltip('hide');
            });