工具提示没有隐藏,如果我们在单击时禁用了该按钮
$("#btn").on("click", function () {
$(this).prop("disabled", true);
});
下面是一个运行示例。https://jsfidle.net/jitangupta/e8fjd0nl/
我正在使用bootstrap 4的基本设置
使用隐藏
或显示
:
$("#btn").on("click", function () {
$(this).prop("disabled", true);
$('[data-toggle="tooltip"]').tooltip('hide');
});
只需使用单行代码来隐藏单击后的任何元素工具提示。
$(document).on("click","*[data-toggle='tooltip']",function(){$(this).tooltip('hide');});